I recieved Reference Error with python 3.8
I'm guessing this is the same as ReferenceError: weakly-referenced object no longer exists, which contains a lot more detail.
@Charanpreet123 - I built an app from your test code and it ran fine on my Galaxy S7. However, I am seeing this same ReferenceError: weakly-referenced object no longer exists error in my own code and have been searching long and hard for a fix. The instructions given in Referencing Widgets (Kivy docs) did not solve the problem.
I finally found a work-around! I went back to hostpython 3.7.5 by adding this to my requirements line in buildozer.spec:
python3==3.7.5, hostpython3==3.7.5
More details: https://stackoverflow.com/a/61777718
@ @bitinerant Thats also works for me , Thanks for your suggestion
python3==3.7.5, hostpython3==3.7.5
@Charanpreet123 - doesn't this mean that there is a bug in the newer version of hostpython3? Where do we file a bug report for that?
No it's more a bug in Kivy and the bug is fixed in master. So new 2.0 release won't have it
No it's more a bug in Kivy and the bug is fixed in master. So new 2.0 release won't have it
Hi I can't find the fix you mention occasionally I run into that error how can I fix it already try what is mentioned above but still showing up?
Yes the fix is there https://github.com/kivy/kivy/pull/6595 which is already part of the Kivy==2.0.0rc2 I believe. Problem is Kivy==2.0.0rc2 has another bug (Android detection) that was fixed in master, so it will be part of the upcoming rc3. So you can either pin the latest master tag Kivy==c0227c5 or use Python 3.7 with requirements=hostpython3== 3.7.7,python3== 3.7.7. For further support request please use Discord support channels
I still get weak reference errors when using Kivy==c0227c5 and python 3.8.1. Only on Android and not on PC.
Then you need to share a complete log and simplified bug reproduction on a dedicated task.
Fill all the info asked by the issue template, plus any required additional info to help track the bug
Changing requirements to Kivy==c0227c5 fixed this problem for me on python 3.8.1 and Android.
@DavidLP have you tried a clean build with this to confirm that Kivy has updated to v2.0.0rc2? You can also see it in the logs on startup.
I upgraded to v2.0.0.rc3 (confirmed by logs on startup) and this fix (catch ReferenceError exception in weakmethod.py) isn't included in the code. I did a clean build.
Windows 10
Python 3.8.0
Android 9
I'm hesitant to lock Kivy to a specific version because then I won't get updates, right?
from all mentioned combinations above only
requirements=python3==3.7.5, hostpython3==3.7.5,kivy + buildozer android clean
finally worked for me on Buildozer 1.2.0 and Android 10 and Kivy 1.11.1 in logcat
I had the same problem, and what helped is moving to kivy==2.0.0
requirements=python3,hostpython3,kivy==2.0.0, ...
Most helpful comment
I finally found a work-around! I went back to hostpython 3.7.5 by adding this to my
requirementsline in buildozer.spec:More details: https://stackoverflow.com/a/61777718