2017-03-03 71 views
0

努力甚至可以運行簡單的Kivy應用程序時,我收到以下錯誤:簡單Kivy應用程序崩潰(版本解鎖鎖)

C:\Users\kprice\Desktop>python test.py 
[INFO ] [Logger  ] Record log in C:\Users\kprice\AppData\Roaming\SPB_16.6\.kivy\logs\kivy_17-03-03_57.txt 
[INFO ] [Kivy  ] v1.9.2.dev0, git-9f2daa0, 20170302 
[INFO ] [Python  ] v3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] 
[INFO ] [Factory  ] 193 symbols loaded 
[INFO ] [Image  ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored) 
[INFO ] [Text  ] Provider: sdl2 
[INFO ] [OSC   ] using <thread> for socket 
[INFO ] [Window  ] Provider: sdl2 
[INFO ] [GL   ] Using the "OpenGL" graphics system 
[INFO ] [GL   ] GLEW initialization succeeded 
[INFO ] [GL   ] Backend used <glew> 
[INFO ] [GL   ] OpenGL version <b'4.3.0 - Build 10.18.15.4256'> 
[INFO ] [GL   ] OpenGL vendor <b'Intel'> 
[INFO ] [GL   ] OpenGL renderer <b'Intel(R) HD Graphics 4400'> 
[INFO ] [GL   ] OpenGL parsed version: 4, 3 
[INFO ] [GL   ] Shading version <b'4.30 - Build 10.18.15.4256'> 
[INFO ] [GL   ] Texture max size <16384> 
[INFO ] [GL   ] Texture max units <32> 
[INFO ] [Shader  ] fragment shader: <b"WARNING: 0:6: '' : #version directive missing"> 
[INFO ] [Shader  ] vertex shader: <b"WARNING: 0:6: '' : #version directive missing"> 
[INFO ] [Window  ] auto add sdl2 input provider 
[INFO ] [Window  ] virtual keyboard not allowed, single mode, not docked 
Traceback (most recent call last): 
    File "test.py", line 13, in <module> 
    MyApp().run() 
    File "C:\Users\kprice\AppData\Local\Programs\Python\Python36\lib\site-packages\kivy\app.py", line 802, in run 
    root = self.build() 
    File "test.py", line 10, in build 
    return Label(text='Hello world') 
    File "C:\Users\kprice\AppData\Local\Programs\Python\Python36\lib\site-packages\kivy\uix\label.py", line 291, in __init__ 
    self._trigger_texture() 
    File "kivy\_clock.pyx", line 75, in kivy._clock.ClockEvent.__call__ (kivy\_clock.c:2223) 
RuntimeError: release unlocked lock 

的應用程序的代碼如下:

from kivy.app import App 
from kivy.uix.label import Label 

class MyApp(App): 

    def build(self): 
     return Label(text='Hello world') 

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

爲什麼即使最基本的程序似乎崩潰的任何想法?

+1

我刪除並重新安裝了Python,因爲我安裝了python 2.7和python 3.6,並且我想我打開了Kivy的安裝....似乎現在正在工作。 –

回答

0

這是一個typo代碼kivy.clock的變化。它基本上調用了兩次方法,它不應該(不釋放線程鎖定)。

我不確定是因爲Cython還是因爲Windows,但我認爲錯誤應該返回ThreadError。 Kivy中的數量太少,因此我不確定它爲什麼會返回錯誤類型的錯誤。

相關問題