Frage

I was running the kivy script below:

main.kv:

<RootWidget>:
    tabs: tabs
    TabbedPanel:
        id: tabs
        panel1: panel1
        panel2: panel2
        panel3: panel3
        panel4: panel4
        panel5: panel5
        do_default_tab: False
        TabbedPanelItem:
            id: panel1
            text: 'Monday'
        TabbedPanelItem:
            id: panel2
            text: 'Tuesday'
        TabbedPanelItem:
            id: panel3
            text: 'Wednesday'
        TabbedPanelItem:
            id: panel4
            text:'Thursday'
        TabbedPanelItem:
            id: panel5
            text: 'Friday'

main.py:

from kivy.uix.tabbedpanel import TabbedPanel
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.properties import ObjectProperty


class RootWidget(FloatLayout):
    def __init__(self):
        pass

class MainApp(App):
    def build(self):
        return RootWidget()

if __name__=='__main__':
    MainApp().run()

and then it all of the sudden I got this error:

[INFO              ] Kivy v1.8.0
[INFO              ] [Logger      ] Record log in C:\Users\Jakob\.kivy\logs\kivy_14-04-22_27.txt
[INFO              ] [Factory     ] 157 symbols loaded
[DEBUG             ] [Cache       ] register <kv.image> with limit=None, timeout=60s
[DEBUG             ] [Cache       ] register <kv.atlas> with limit=None, timeout=Nones
[INFO              ] [Image       ] Providers: img_tex, img_dds, img_pygame, img_pil, img_gif
[DEBUG             ] [Cache       ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG             ] [Cache       ] register <kv.shader> with limit=1000, timeout=3600s
[DEBUG             ] [Cache       ] register <kv.lang> with limit=None, timeout=Nones
[INFO              ] [Text        ] Provider: pygame
[DEBUG             ] [Window      ] Ignored <egl_rpi> (import error)
[INFO              ] [Window      ] Provider: pygame(['window_egl_rpi'] ignored)
libpng warning: iCCP: known incorrect sRGB profile
[DEBUG             ] [Window      ] Display driver windib
[DEBUG             ] [Window      ] Actual window size: 800x600
[DEBUG             ] [Window      ] Actual color bits r8 g8 b8 a8
[DEBUG             ] [Window      ] Actual depth bits: 24
[DEBUG             ] [Window      ] Actual stencil bits: 8
[DEBUG             ] [Window      ] Actual multisampling samples: 2
GLEW initialization succeeded
[INFO              ] [GL          ] OpenGL version <4.2.11476 Compatibility Profile Context>
[INFO              ] [GL          ] OpenGL vendor <ATI Technologies Inc.>
[INFO              ] [GL          ] OpenGL renderer <AMD Radeon HD 7640G>
[INFO              ] [GL          ] OpenGL parsed version: 4, 2
[INFO              ] [GL          ] Shading version <4.20>
[INFO              ] [GL          ] Texture max size <16384>
[INFO              ] [GL          ] Texture max units <16>
[INFO              ] [Shader      ] fragment shader: <Fragment shader was successfully compiled to run on hardware.>
[DEBUG             ] [Shader      ] Fragment compiled successfully
[INFO              ] [Shader      ] vertex shader: <Vertex shader was successfully compiled to run on hardware.>
[DEBUG             ] [Shader      ] Vertex compiled successfully
[INFO              ] [Shader      ] program: <Vertex shader(s) linked, fragment shader(s) linked.
 >
[DEBUG             ] [ImagePygame ] Load <C:\Python27\lib\site-packages\kivy\data\glsl\default.png>
[INFO              ] [Window      ] virtual keyboard not allowed, single mode, not docked
[DEBUG             ] [App         ] Loading kv <C:\Users\Jakob\Documents\GitHub\School-Organized\School-Organized\main.kv>
Fatal Python error: (pygame parachute) Segmentation Fault

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

I tried uninstalling and reinstalling Pygame, but the error is reoccuring. I am using 64bit python 2.7.6, and i installed pygame and kivy from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/

War es hilfreich?

Lösung

Well it seems I solved this problem and it had nothing to do with a corrupted pygame install or anything installed in general. The empty __init__ function caused this error! Hope this is useful for people perplexed in the future.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top