-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Examples does not work with kivy 2.1 #289
Comments
me too. |
In the file "yourappname.kv" comment out -> #TestGame: |
Yes, because no |
So, I tried everything to get rid of the abovementioned WidgetException, rebuilt Kivy (both 2.1.0 and 2.2.0.dev0), rebuilt kivent_core, used older Python versions, without result. Is there any solution? |
I spent my whole morning on this. TL:DR; this works on WSL (so on the ubuntu side), using vcxsrv to see the linux windows on Windows, .xlaunch file is here:
the issue lies when you add a system to the gameworld:
best guess: game systems are treated as kivy widgets and mess up the widget tree, hence the widget parent is a FLOAT, not even a widget as seen in this error: the original exception is here in gameworld.pyx:
THIS WORKS (but has a blank screen)
so does this (also black screen)
|
Can not run examples with kivy 2.1.0
Traceback (most recent call last):
File "/home/alcatraz/devel/python/alcatraz/myrpg-env/src/kivent_test/examples/2_basic_app/./main.py", line 79, in
YourAppNameApp().run()
File "/home/alcatraz/devel/python/alcatraz/myrpg-env/lib/python3.10/site-packages/kivy/app.py", line 954, in run
self._run_prepare()
File "/home/alcatraz/devel/python/alcatraz/myrpg-env/lib/python3.10/site-packages/kivy/app.py", line 923, in _run_prepare
self.load_kv(filename=self.kv_file)
File "/home/alcatraz/devel/python/alcatraz/myrpg-env/lib/python3.10/site-packages/kivy/app.py", line 696, in load_kv
root = Builder.load_file(rfilename)
File "/home/alcatraz/devel/python/alcatraz/myrpg-env/lib/python3.10/site-packages/kivy/lang/builder.py", line 305, in load_file
return self.load_string(data, **kwargs)
File "/home/alcatraz/devel/python/alcatraz/myrpg-env/lib/python3.10/site-packages/kivy/lang/builder.py", line 405, in load_string
widget.apply_class_lang_rules(
File "/home/alcatraz/devel/python/alcatraz/myrpg-env/lib/python3.10/site-packages/kivy/uix/widget.py", line 470, in apply_class_lang_rules
Builder.apply(
File "/home/alcatraz/devel/python/alcatraz/myrpg-env/lib/python3.10/site-packages/kivy/lang/builder.py", line 540, in apply
self._apply_rule(
File "/home/alcatraz/devel/python/alcatraz/myrpg-env/lib/python3.10/site-packages/kivy/lang/builder.py", line 662, in _apply_rule
self._apply_rule(
File "/home/alcatraz/devel/python/alcatraz/myrpg-env/lib/python3.10/site-packages/kivy/lang/builder.py", line 659, in _apply_rule
widget.add_widget(child)
File "kivent_core/gameworld.pyx", line 610, in kivent_core.gameworld.GameWorld.add_widget
kivy.uix.widget.WidgetException: Cannot add <kivent_core.systems.position_systems.PositionSystem2D object at 0x7f37dab9b100>, it already has a parent 1.0
The text was updated successfully, but these errors were encountered: