tito/kivy — Issue #293: kv lang multi-line problem
Author: akshayaurora
Created: 2011-10-27 14:06:46+00:00
State: open

using the following code:

import kivy
kivy.require('1.0.8')

from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.button import Button
from kivy.lang import Builder
Builder.load_string('''

Button:
text: 'hello World'
on_release:
print 'hello'
''')

class mainclass(FloatLayout):

def __init__(self, **kwargs):
super(mainclass, self).__init__()

class mainFrameWorkApp(App):

def build(self):
return mainclass()

if __name__ in ('__main__', '__android__'):
mainFrameWorkApp().run()

I get the following error:

python test.py
[INFO ] Kivy v1.0.9-dev
[INFO ] [Logger ] Record log in /home/qua-non/.kivy/logs/kivy_11-10-27_33.txt
[INFO ] [Factory ] 99 symbols loaded
[DEBUG ] [Cache ] register with limit=None, timeout=Nones
[DEBUG ] [Cache ] register with limit=None, timeout=60s
[DEBUG ] [Cache ] register with limit=1000, timeout=60s
[DEBUG ] [Cache ] register with limit=1000, timeout=60s
[INFO ] [Text ] using as text provider
[DEBUG ] [App ] kv not found
[INFO ] [Window ] using as window provider
[WARNING] [WinPygame ] Video: failed (multisamples=2)
[WARNING] [WinPygame ] trying without antialiasing
[INFO ] [GL ] OpenGL version <2.1 Mesa 7.11>
[INFO ] [GL ] OpenGL vendor
[INFO ] [GL ] OpenGL renderer
[INFO ] [GL ] Shading version <1.20>
[INFO ] [GL ] Texture max size <8192>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Shader ] fragment compiled successfully
[INFO ] [Shader ] vertex compiled successfully
[DEBUG ] [ImagePygame ] Load
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[DEBUG ] [ImagePygame ] Load
[INFO ] [GL ] NPOT texture support is available
[INFO ] [OSC ] using for socket
[ERROR ] [Input ] MTDev is not supported by your version of linux
Traceback (most recent call last):
File "/mnt/Data2/multitouch/MT__code/kivy/kivy/input/providers/__init__.py", line 36, in
from kivy.input.providers.mtdev import *
File "/mnt/Data2/multitouch/MT__code/kivy/kivy/input/providers/mtdev.py", line 74, in
from kivy.lib.mtdev import Device, \
File "/mnt/Data2/multitouch/MT__code/kivy/kivy/lib/mtdev.py", line 17, in
libmtdev = cdll.LoadLibrary('libmtdev.so.1')
File "/usr/lib64/python2.7/ctypes/__init__.py", line 431, in LoadLibrary
return self._dlltype(name)
File "/usr/lib64/python2.7/ctypes/__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libmtdev.so.1: cannot open shared object file: No such file or directory
[DEBUG ] [Base ] Create provider from tuio,0.0.0.0:3333
[DEBUG ] [Base ] Create provider from mouse
[DEBUG ] [Base ] Create provider from probesysfs
[DEBUG ] [ProbeSysfs ] found device: Microsoft Microsoft® 2.4GHz Transceiver v8.0 at /dev/input/event4
[INFO ] [ProbeSysfs ] device match: /dev/input/event4
[INFO ] [ProbeSysfs ] unable to found provider mtdev
[INFO ] [ProbeSysfs ] fallback on hidinput
[INFO ] [HIDInput ] Read event from
[INFO ] [Base ] Start application main loop
[DEBUG ] [OSC ] Start thread <0.0.0.0:3333>
[INFO ] [OSC ] listening for Tuio on 0.0.0.0:3333
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib64/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "/mnt/Data2/multitouch/MT__code/kivy/kivy/input/providers/hidinput.py", line 254, in _thread_run
fd = open(input_fn, 'rb')
IOError: [Errno 13] Permission denied: '/dev/input/event4'

[DEBUG ] [ImagePygame ] Load
[INFO ] [Base ] Leaving application in progress...
[DEBUG ] [OSC ] Stop thread <0.0.0.0:3333>
[DEBUG ] [OSC ] Stop thread <0.0.0.0:3333> finished
Traceback (most recent call last):
File "test.py", line 28, in
mainFrameWorkApp().run()
File "/mnt/Data2/multitouch/MT__code/kivy/kivy/app.py", line 430, in run
runTouchApp()
File "/mnt/Data2/multitouch/MT__code/kivy/kivy/base.py", line 424, in runTouchApp
EventLoop.window.mainloop()
File "/mnt/Data2/multitouch/MT__code/kivy/kivy/core/window/window_pygame.py", line 273, in mainloop
self._mainloop()
File "/mnt/Data2/multitouch/MT__code/kivy/kivy/core/window/window_pygame.py", line 188, in _mainloop
EventLoop.idle()
File "/mnt/Data2/multitouch/MT__code/kivy/kivy/base.py", line 276, in idle
self.dispatch_input()
File "/mnt/Data2/multitouch/MT__code/kivy/kivy/base.py", line 261, in dispatch_input
self.post_dispatch_input(etype, me)
File "/mnt/Data2/multitouch/MT__code/kivy/kivy/base.py", line 232, in post_dispatch_input
wid.dispatch('on_touch_up', me)
File "event.pyx", line 132, in kivy.event.EventDispatcher.dispatch (kivy/event.c:1590)
File "/mnt/Data2/multitouch/MT__code/kivy/kivy/uix/button.py", line 133, in on_touch_up
self.dispatch('on_release')
File "event.pyx", line 128, in kivy.event.EventDispatcher.dispatch (kivy/event.c:1534)
File "/mnt/Data2/multitouch/MT__code/kivy/kivy/lang.py", line 783, in custom_callback
exec value[1]
File "", line 1, in
NameError: name 'r' is not defined