Didn't get a response in the kivy forum, so trying here.
When I compile the tutorial pong code as a one file executable, I must still include the pong.kv file in the same folder for it to run. Otherwise, I get the following error when launching the exe:
GL: EXT_framebuffer_object is supported
[INFO ] [GL ] OpenGL version
[INFO ] [GL ] OpenGL vendor
[INFO ] [GL ] OpenGL renderer
[INFO ] [GL ] OpenGL parsed version: 2, 1
[INFO ] [GL ] Shading version
[INFO ] [GL ] Texture max size
[INFO ] [GL ] Texture max units
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed,
single mode, not docked
Traceback (most recent call last):
File "", line 81, in
File "c:\python34\lib\site-packages\kivy\app.py", line 802, in
run
root = self.build()
File "", line 75, in build
File "", line 20, in serveBall
AttributeError: 'NoneType' object has no attribute 'center'
main returned -1
How can I get it to run as one executable. Here's my pong.spec file:
# -*- mode: python -*-
from kivy.deps import sdl2, glew
block_cipher = None
a = Analysis(['Code\main.py'],
pathex=['E:\\Development\\Pong'],
binaries=None,
datas=None,
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
a.datas += [('Code\pong.kv', 'E:\\Development\\Pong\Code\pong.kv', 'DATA')]
exe = EXE(pyz,Tree('Code'),
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
*[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)],
name='pong',
debug=False,
strip=False,
upx=True,
console=True , icon='pong.ico')
Note that I tried to include the pong.kv in the datas list but that didn't help.
Thanks, -Raj