2014-04-22 38 views
1

我運行下面的腳本kivy:pygame的分割錯誤

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() 

,然後所有的突然我得到這個錯誤:

[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. 

我試着卸載並重新安裝Pygame,但錯誤正在重新分配。我使用64位Python 2.7.6,我從這裏安裝pygame和kivy:http://www.lfd.uci.edu/~gohlke/pythonlibs/

+0

嘗試使用官方軟件包進行安裝,並查看問題是否仍然存在:http://kivy.org/docs/installation/installation-windows.html –

+1

好吧,我會嘗試,但我很確定這是一個pygame錯誤。問題是kivy不能與我的64位python :(所以我將不得不使用kivy手提電腦,這仍然是一個選項 – pianist1119

+0

啊,我看到使用現有環境的說明會導致非官方的下載。是的,我會推薦使用便攜版本,除非你有特定的需要運行64位 - 無論電腦/操作系統是多少,大多數Windows應用程序都是32位。 –

回答

2

好吧,我似乎解決了這個問題,它與損壞的pygame安裝或一般安裝的任何東西無關。空的__init__函數導致了這個錯誤!希望這對於未來困惑的人有用。