Created
June 5, 2011 15:47
-
-
Save encukou/1009074 to your computer and use it in GitHub Desktop.
IO error in Kivy
This file contains 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
# Encoding: UTF-8 | |
from kivy.app import App | |
from kivy.uix.widget import Widget | |
from kivy.uix.label import Label | |
from kivy.clock import Clock | |
from kivy.animation import Animation | |
class CountWidget(Widget): | |
def __init__(self): | |
super(CountWidget, self).__init__() | |
Clock.schedule_once(lambda dt: self.count(), 1) | |
def count(self, num=0): | |
label = Label( | |
text=str(num), | |
font_size=24, | |
color=(0, 0, 1, 1), | |
) | |
animation = Animation(font_size=256, color=(0, 0, 1, 0), duration=3) | |
animation.start(label) | |
self.add_widget(label) | |
Clock.schedule_once(lambda dt: self.count(num + 1), 0.5) | |
class TheApp(App): | |
def build(self): | |
return CountWidget() | |
if __name__ == '__main__': | |
TheApp().run() |
This file contains 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 ioerror.py | |
[INFO ] Kivy v1.0.7-dev | |
[INFO ] [Logger ] Record log in /home/petr/.kivy/logs/kivy_11-06-05_93.txt | |
[INFO ] [Factory ] 93 symbols loaded | |
[INFO ] [Text ] using <pygame> as text provider | |
[INFO ] [Window ] using <pygame> as window provider | |
[WARNING] [WinPygame ] Video: failed (multisamples=2) | |
[WARNING] [WinPygame ] trying without antialiasing | |
[INFO ] [GL ] OpenGL version <2.1 Mesa 7.9-devel> | |
[INFO ] [GL ] OpenGL vendor <Tungsten Graphics, Inc> | |
[INFO ] [GL ] OpenGL renderer <Mesa DRI Intel(R) Ironlake Mobile GEM 20100330 DEVELOPMENT > | |
[INFO ] [GL ] Shading version <1.20> | |
[INFO ] [GL ] Texture max size <4096> | |
[INFO ] [GL ] Texture max units <16> | |
[INFO ] [Shader ] fragment compiled successfully | |
[INFO ] [Shader ] vertex compiled successfully | |
[INFO ] [OSC ] using <multiprocessing> for socket | |
[INFO ] [Base ] Start application main loop | |
[INFO ] [OSC ] listening for Tuio on 0.0.0.0:3333 | |
[INFO ] [Base ] Leaving application in progress... | |
Traceback (most recent call last): | |
File "ioerror.py", line 30, in <module> | |
TheApp().run() | |
File "/home/petr/programs/virtualenv/mt/lib/python2.6/site-packages/kivy/app.py", line 197, in run | |
runTouchApp() | |
File "/home/petr/programs/virtualenv/mt/lib/python2.6/site-packages/kivy/base.py", line 401, in runTouchApp | |
EventLoop.window.mainloop() | |
File "/home/petr/programs/virtualenv/mt/lib/python2.6/site-packages/kivy/core/window/window_pygame.py", line 254, in mainloop | |
self._mainloop() | |
File "/home/petr/programs/virtualenv/mt/lib/python2.6/site-packages/kivy/core/window/window_pygame.py", line 173, in _mainloop | |
EventLoop.idle() | |
File "/home/petr/programs/virtualenv/mt/lib/python2.6/site-packages/kivy/base.py", line 265, in idle | |
Clock.tick() | |
File "/home/petr/programs/virtualenv/mt/lib/python2.6/site-packages/kivy/clock.py", line 251, in tick | |
self._process_events() | |
File "/home/petr/programs/virtualenv/mt/lib/python2.6/site-packages/kivy/clock.py", line 356, in _process_events | |
if event.tick(self._last_tick) is False: | |
File "/home/petr/programs/virtualenv/mt/lib/python2.6/site-packages/kivy/clock.py", line 170, in tick | |
ret = callback(self._dt) | |
File "/home/petr/programs/virtualenv/mt/lib/python2.6/site-packages/kivy/uix/label.py", line 81, in texture_update | |
self._label.refresh() | |
File "/home/petr/programs/virtualenv/mt/lib/python2.6/site-packages/kivy/core/text/__init__.py", line 334, in refresh | |
sz = self.render() | |
File "/home/petr/programs/virtualenv/mt/lib/python2.6/site-packages/kivy/core/text/__init__.py", line 190, in render | |
lw, lh = self.get_extents(line) | |
File "/home/petr/programs/virtualenv/mt/lib/python2.6/site-packages/kivy/core/text/text_pygame.py", line 59, in get_extents | |
font = self._get_font() | |
File "/home/petr/programs/virtualenv/mt/lib/python2.6/site-packages/kivy/core/text/text_pygame.py", line 38, in _get_font | |
int(self.options['font_size'] * 1.333)) | |
IOError: unable to read font filename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment