我正在运行下面的kivy脚本:
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 :(得分:2)
好吧,我似乎解决了这个问题,它与损坏的pygame安装或一般安装的任何东西无关。空 __ init __ 函数导致此错误!希望这对将来困惑的人有用。