Created
April 3, 2013 20:29
-
-
Save ihaque/5304943 to your computer and use it in GitHub Desktop.
Debug kivy MarkupLabel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kivy | |
kivy.require('1.6.0') # replace with your current kivy version ! | |
from kivy.app import App | |
from kivy.uix.label import Label | |
class MyApp(App): | |
def build(self): | |
return Label(text='Hello World', markup=True) | |
if __name__ == '__main__': | |
MyApp().run() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python demo.py | |
[INFO ] Kivy v1.6.0 | |
[INFO ] [Logger ] Record log in /Users/ihaque/.kivy/logs/kivy_13-04-03_48.txt | |
[INFO ] [Factory ] 137 symbols loaded | |
[DEBUG ] [Cache ] register <kv.lang> with limit=None, timeout=Nones | |
[DEBUG ] [Cache ] register <kv.image> with limit=None, timeout=60s | |
[DEBUG ] [Cache ] register <kv.atlas> with limit=None, timeout=Nones | |
[INFO ] [Image ] Providers: img_imageio, 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 | |
/usr/local/lib/python2.7/site-packages/kivy/core/text/text_pygame.py:19: RuntimeWarning: use font: No module named font | |
(ImportError: No module named font) | |
pygame.font.init() | |
[DEBUG ] [Text ] Ignored <sdlttf> (import error) | |
[INFO ] [Text ] Provider: pil(['text_pygame', 'text_sdlttf'] ignored) | |
[DEBUG ] [App ] Loading kv <./my.kv> | |
[DEBUG ] [App ] kv <./my.kv> not found | |
[INFO ] [Window ] Provider: pygame | |
[ERROR ] [WinPygame ] unable to set icon | |
Traceback (most recent call last): | |
File "/usr/local/lib/python2.7/site-packages/kivy/core/window/window_pygame.py", line 179, in set_icon | |
im = pygame.image.load(filename) | |
error: File is not a Windows BMP file | |
[DEBUG ] [Window ] Display driver Quartz | |
[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: 4 | |
[INFO ] [GL ] OpenGL version <2.1 INTEL-8.10.44> | |
[INFO ] [GL ] OpenGL vendor <Intel Inc.> | |
[INFO ] [GL ] OpenGL renderer <Intel HD Graphics 4000 OpenGL Engine> | |
[INFO ] [GL ] OpenGL parsed version: 2, 1 | |
[INFO ] [GL ] Shading version <1.20> | |
[INFO ] [GL ] Texture max size <16384> | |
[INFO ] [GL ] Texture max units <16> | |
[DEBUG ] [Shader ] Fragment compiled successfully | |
[DEBUG ] [Shader ] Vertex compiled successfully | |
[DEBUG ] [ImageImageIO] Load </usr/local/lib/python2.7/site-packages/kivy/data/glsl/default.png> | |
[INFO ] [GL ] BGRA texture support is available | |
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked | |
[INFO ] [OSC ] using <multiprocessing> for socket | |
[DEBUG ] [Base ] Create provider from mouse | |
[INFO ] [Base ] Start application main loop | |
[INFO ] [Base ] Leaving application in progress... | |
Traceback (most recent call last): | |
File "demo.py", line 12, in <module> | |
MyApp().run() | |
File "/usr/local/lib/python2.7/site-packages/kivy/app.py", line 546, in run | |
runTouchApp() | |
File "/usr/local/lib/python2.7/site-packages/kivy/base.py", line 445, in runTouchApp | |
EventLoop.window.mainloop() | |
File "/usr/local/lib/python2.7/site-packages/kivy/core/window/window_pygame.py", line 324, in mainloop | |
self._mainloop() | |
File "/usr/local/lib/python2.7/site-packages/kivy/core/window/window_pygame.py", line 230, in _mainloop | |
EventLoop.idle() | |
File "/usr/local/lib/python2.7/site-packages/kivy/base.py", line 293, in idle | |
Clock.tick() | |
File "/usr/local/lib/python2.7/site-packages/kivy/clock.py", line 313, in tick | |
self._process_events() | |
File "/usr/local/lib/python2.7/site-packages/kivy/clock.py", line 424, in _process_events | |
if event.tick(self._last_tick) is False: | |
File "/usr/local/lib/python2.7/site-packages/kivy/clock.py", line 232, in tick | |
ret = callback(self._dt) | |
File "/usr/local/lib/python2.7/site-packages/kivy/uix/label.py", line 188, in texture_update | |
self._label.refresh() | |
File "/usr/local/lib/python2.7/site-packages/kivy/core/text/__init__.py", line 431, in refresh | |
self.render(real=True) | |
File "/usr/local/lib/python2.7/site-packages/kivy/core/text/markup.py", line 111, in render | |
ret = self._real_render() | |
File "/usr/local/lib/python2.7/site-packages/kivy/core/text/markup.py", line 408, in _real_render | |
self.texture.blit_data(data) | |
AttributeError: 'NoneType' object has no attribute 'blit_data' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment