kivy/kivy — pull request #1064 by JonasGroeger (2013-03-29 10:35:55+00:00)
Title: Fixed example app not launching

When starting the `examples/kv/app_scatter.kv` with `kvrun.py` the app crashes:

$ python kvrun.py app_scatter.kv
[INFO ] Kivy v1.6.0
[INFO ] [Logger ] Record log in /home/jonas/.kivy/logs/kivy_13-03-29_31.txt
[INFO ] [Factory ] 137 symbols loaded
[DEBUG ] [Cache ] register with limit=None, timeout=Nones
[DEBUG ] [Cache ] register with limit=None, timeout=60s
[DEBUG ] [Cache ] register with limit=None, timeout=Nones
[INFO ] [Image ] Providers: img_tex, img_dds, img_pygame, img_pil, img_gif
[DEBUG ] [Cache ] register with limit=1000, timeout=60s
[DEBUG ] [Cache ] register with limit=1000, timeout=3600s
[INFO ] [Window ] Provider: pygame
[DEBUG ] [Window ] Display driver x11
[DEBUG ] [Window ] Actual window size: 800x600
[DEBUG ] [Window ] Actual color bits r8 g8 b8 a0
[DEBUG ] [Window ] Actual depth bits: 24
[DEBUG ] [Window ] Actual stencil bits: 8
[DEBUG ] [Window ] Actual multisampling samples: 4
[INFO ] [GL ] OpenGL version <3.0 Mesa 9.0.2>
[INFO ] [GL ] OpenGL vendor
[INFO ] [GL ] OpenGL renderer
[INFO ] [GL ] OpenGL parsed version: 3, 0
[INFO ] [GL ] Shading version <1.30>
[INFO ] [GL ] Texture max size <8192>
[INFO ] [GL ] Texture max units <16>
[DEBUG ] [Shader ] Fragment compiled successfully
[DEBUG ] [Shader ] Vertex compiled successfully
[DEBUG ] [ImagePygame ] Load
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[DEBUG ] [App ] Loading kv <./kv.kv>
[DEBUG ] [App ] kv <./kv.kv> not found
Traceback (most recent call last):
File "kvrun.py", line 34, in
KvApp(filename=sys.argv[1]).run()
File "/usr/lib/pymodules/python2.7/kivy/app.py", line 527, in run
root = self.build()
File "kvrun.py", line 24, in build
return Builder.load_file(self.options['filename'])
File "/usr/lib/pymodules/python2.7/kivy/lang.py", line 1152, in load_file
return self.load_string(data, **kwargs)
File "/usr/lib/pymodules/python2.7/kivy/lang.py", line 1186, in load_string
parser = Parser(content=string, filename=fn)
File "/usr/lib/pymodules/python2.7/kivy/lang.py", line 785, in __init__
self.parse(content)
File "/usr/lib/pymodules/python2.7/kivy/lang.py", line 858, in parse
objects, remaining_lines = self.parse_level(0, lines)
File "/usr/lib/pymodules/python2.7/kivy/lang.py", line 947, in parse_level
_objects, _lines = self.parse_level(level + 1, lines[i:])
File "/usr/lib/pymodules/python2.7/kivy/lang.py", line 925, in parse_level
'Invalid data after declaration')
kivy.lang.ParserException: Parser: File "app_scatter.kv", line 3:
...
1:Widget:
2: Scatter:
>> 3: size: image.texture_size
4: Image:
5: id: image
...
Invalid data after declaration

I fixed it. See the pull-request.

-- Jonas