Skip to content
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

Kivy crash error TypeError: 'NoneType' object is not subscriptable #944

Closed
AhmetTarikulu opened this issue Jul 28, 2019 · 8 comments
Closed

Comments

@AhmetTarikulu
Copy link

AhmetTarikulu commented Jul 28, 2019

I make a simple kivy android app using buildozer, I make a .apk file and run it on my phone but it crashes on startup so I debugged it ,logs are :

07-28 12:53:23.633 20111 20149 I python  : Changing directory to the one provided by ANDROID_ARGUMENT
07-28 12:53:23.633 20111 20149 I python  : /data/user/0/org.test.myapp/files/app
07-28 12:53:23.633 20111 20149 I python  : Preparing to initialize python
07-28 12:53:23.633 20111 20149 I python  : _python_bundle dir exists
07-28 12:53:23.633 20111 20149 I python  : calculated paths to be...
07-28 12:53:23.633 20111 20149 I python  : /data/user/0/org.test.myapp/files/app/_python_bundle/stdlib.zip:/data/user/0/org.test.myapp/files/app/_python_bundle/modules
07-28 12:53:23.634 20111 20149 I python  : set wchar paths...
07-28 12:53:23.669 20111 20149 I python  : Initialized python
07-28 12:53:23.669 20111 20149 I python  : AND: Init threads
07-28 12:53:23.669 20111 20149 I python  : testing python print redirection
07-28 12:53:23.670 20111 20149 I python  : Android path ['.', '/data/user/0/org.test.myapp/files/app/_python_bundle/stdlib.zip', '/data/user/0/org.test.myapp/files/app/_python_bundle/modules', '/data/user/0/org.test.myapp/files/app/_python_bundle/site-packages']
07-28 12:53:23.671 20111 20149 I python  : os.environ is environ({'PATH': '/sbin:/system/sbin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin', 'DOWNLOAD_CACHE': '/data/cache', 'ANDROID_BOOTLOGO': '1', 'ANDROID_ROOT': '/system', 'ANDROID_ASSETS': '/system/app', 'ANDROID_DATA': '/data', 'ANDROID_STORAGE': '', 'EXTERNAL_STORAGE': '/sdcard', 'ASEC_MOUNTPOINT': '/mnt/asec', 'BOOTCLASSPATH': '/system/framework/core-oj.jar:/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/bouncycastle.jar:/system/framework/apache-xml.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/android.hidl.base-V1.0-java.jar:/system/framework/android.hidl.manager-V1.0-java.jar:/system/framework/framework-oahl-backward-compatibility.jar:/system/framework/android.test.base.jar:/system/framework/featurelayer-widget.jar:/system/framework/hwEmui.jar:/system/framework/hwTelephony-common.jar:/system/framework/hwframework.jar:/system/framework/com.huawei.nfc.jar:/system/framework/org.ifaa.android.manager.jar:/system/framework/hwaps.jar:/system/framework/hwcustEmui.jar:/system/framework/hwcustframework.jar:/system/framework/hwcustTelephony-common.jar:/system/framework/servicehost.jar:/system/framework/hwIAwareAL.jar', 'SYSTEMSERVERCLASSPATH': '/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar:/system/framework/com.android.location.provider.jar:/system/framework/hwServices.jar:/system/framework/hwWifi-service.jar:/system/framework/hwcustServices.jar:/system/framework/hwcustwifi-service.jar', 'OEM_ROOT': '/product/hw_oem/POT-L01', 'ODM_PRODUCT': '/odm/hw_odm/POT-L01', 'CUST_POLICY_DIRS': '/system/emui/base:/system/emui/oversea:/system/emui/lite:/vendor/etc:/odm/etc:/product/etc:/odm/hw_odm/POT-L01:/product/region_comm/oversea:/product/hw_oem/POT-L01:/preload/POT-L01/hw/eu:/cust/global:/cust/hw/eu:/product/special_cust/POT-L01/hw/eu', 'ANDROID_SOCKET_zygote_secondary': '18', 'ANDROID_ENTRYPOINT': 'main.pyc', 'ANDROID_ARGUMENT': '/data/user/0/org.test.myapp/files/app', 'ANDROID_APP_PATH': '/data/user/0/org.test.myapp/files/app', 'ANDROID_PRIVATE': '/data/user/0/org.test.myapp/files', 'ANDROID_UNPACK': '/data/user/0/org.test.myapp/files/app', 'PYTHONHOME': '/data/user/0/org.test.myapp/files/app', 'PYTHONPATH': '/data/user/0/org.test.myapp/files/app:/data/user/0/org.test.myapp/files/app/lib', 'PYTHONOPTIMIZE': '2', 'P4A_BOOTSTRAP': 'SDL2', 'PYTHON_NAME': 'python', 'P4A_IS_WINDOWED': 'True', 'P4A_ORIENTATION': 'portrait', 'P4A_NUMERIC_VERSION': 'None', 'P4A_MINSDK': '21', 'LC_CTYPE': 'C.UTF-8'})
07-28 12:53:23.671 20111 20149 I python  : Android kivy bootstrap done. __name__ is __main__
07-28 12:53:23.671 20111 20149 I python  : AND: Ran string
07-28 12:53:23.671 20111 20149 I python  : Run user program, change dir and execute entrypoint
07-28 12:53:23.794 20111 20149 I python  : [INFO   ] [Logger      ] Record log in /data/user/0/org.test.myapp/files/app/.kivy/logs/kivy_19-07-28_12.txt
07-28 12:53:23.794 20111 20149 I python  : [INFO   ] [Kivy        ] v1.11.0
07-28 12:53:23.795 20111 20149 I python  : [INFO   ] [Kivy        ] Installed at "/data/user/0/org.test.myapp/files/app/_python_bundle/site-packages/kivy/__init__.pyc"
07-28 12:53:23.795 20111 20149 I python  : [INFO   ] [Python      ] v3.7.1 (default, Jul  9 2019, 22:19:35)
07-28 12:53:23.795 20111 20149 I python  : [Clang 6.0.2 (https://android.googlesource.com/toolchain/clang 183abd29fc496f55
07-28 12:53:23.795 20111 20149 I python  : [INFO   ] [Python      ] Interpreter at "android_python"
07-28 12:53:24.263 20111 20149 I python  : [INFO   ] [Factory     ] 184 symbols loaded
07-28 12:53:24.539 20111 20149 I python  : [INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
07-28 12:53:24.580 20111 20149 I python  : [INFO   ] [Text        ] Provider: sdl2
07-28 12:53:24.584 20111 20149 I python  :  Traceback (most recent call last):
07-28 12:53:24.584 20111 20149 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/app/main.py", line 28, in <module>
07-28 12:53:24.584 20111 20149 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/builder.py", line 301, in load_file
07-28 12:53:24.585 20111 20149 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/builder.py", line 368, in load_string
07-28 12:53:24.585 20111 20149 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 401, in __init__
07-28 12:53:24.585 20111 20149 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 510, in parse
07-28 12:53:24.586 20111 20149 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 614, in parse_level
07-28 12:53:24.586 20111 20149 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 614, in parse_level
07-28 12:53:24.586 20111 20149 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 673, in parse_level
07-28 12:53:24.586 20111 20149 I python  :  TypeError: 'NoneType' object is not subscriptable
07-28 12:53:24.586 20111 20149 I python  : Python for android ended.
07-28 13:01:29.230 20813 20853 I python  : Initializing Python for Android
07-28 13:01:29.230 20813 20853 I python  : Setting additional env vars from p4a_env_vars.txt
07-28 13:01:29.230 20813 20853 I python  : Changing directory to the one provided by ANDROID_ARGUMENT
07-28 13:01:29.230 20813 20853 I python  : /data/user/0/org.test.myapp/files/app
07-28 13:01:29.230 20813 20853 I python  : Preparing to initialize python
07-28 13:01:29.230 20813 20853 I python  : _python_bundle dir exists
07-28 13:01:29.230 20813 20853 I python  : calculated paths to be...
07-28 13:01:29.230 20813 20853 I python  : /data/user/0/org.test.myapp/files/app/_python_bundle/stdlib.zip:/data/user/0/org.test.myapp/files/app/_python_bundle/modules
07-28 13:01:29.230 20813 20853 I python  : set wchar paths...
07-28 13:01:29.265 20813 20853 I python  : Initialized python
07-28 13:01:29.265 20813 20853 I python  : AND: Init threads
07-28 13:01:29.266 20813 20853 I python  : testing python print redirection
07-28 13:01:29.267 20813 20853 I python  : Android path ['.', '/data/user/0/org.test.myapp/files/app/_python_bundle/stdlib.zip', '/data/user/0/org.test.myapp/files/app/_python_bundle/modules', '/data/user/0/org.test.myapp/files/app/_python_bundle/site-packages']
07-28 13:01:29.267 20813 20853 I python  : os.environ is environ({'PATH': '/sbin:/system/sbin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin', 'DOWNLOAD_CACHE': '/data/cache', 'ANDROID_BOOTLOGO': '1', 'ANDROID_ROOT': '/system', 'ANDROID_ASSETS': '/system/app', 'ANDROID_DATA': '/data', 'ANDROID_STORAGE': '', 'EXTERNAL_STORAGE': '/sdcard', 'ASEC_MOUNTPOINT': '/mnt/asec', 'BOOTCLASSPATH': '/system/framework/core-oj.jar:/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/bouncycastle.jar:/system/framework/apache-xml.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/android.hidl.base-V1.0-java.jar:/system/framework/android.hidl.manager-V1.0-java.jar:/system/framework/framework-oahl-backward-compatibility.jar:/system/framework/android.test.base.jar:/system/framework/featurelayer-widget.jar:/system/framework/hwEmui.jar:/system/framework/hwTelephony-common.jar:/system/framework/hwframework.jar:/system/framework/com.huawei.nfc.jar:/system/framework/org.ifaa.android.manager.jar:/system/framework/hwaps.jar:/system/framework/hwcustEmui.jar:/system/framework/hwcustframework.jar:/system/framework/hwcustTelephony-common.jar:/system/framework/servicehost.jar:/system/framework/hwIAwareAL.jar', 'SYSTEMSERVERCLASSPATH': '/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar:/system/framework/com.android.location.provider.jar:/system/framework/hwServices.jar:/system/framework/hwWifi-service.jar:/system/framework/hwcustServices.jar:/system/framework/hwcustwifi-service.jar', 'OEM_ROOT': '/product/hw_oem/POT-L01', 'ODM_PRODUCT': '/odm/hw_odm/POT-L01', 'CUST_POLICY_DIRS': '/system/emui/base:/system/emui/oversea:/system/emui/lite:/vendor/etc:/odm/etc:/product/etc:/odm/hw_odm/POT-L01:/product/region_comm/oversea:/product/hw_oem/POT-L01:/preload/POT-L01/hw/eu:/cust/global:/cust/hw/eu:/product/special_cust/POT-L01/hw/eu', 'ANDROID_SOCKET_zygote_secondary': '18', 'ANDROID_ENTRYPOINT': 'main.pyc', 'ANDROID_ARGUMENT': '/data/user/0/org.test.myapp/files/app', 'ANDROID_APP_PATH': '/data/user/0/org.test.myapp/files/app', 'ANDROID_PRIVATE': '/data/user/0/org.test.myapp/files', 'ANDROID_UNPACK': '/data/user/0/org.test.myapp/files/app', 'PYTHONHOME': '/data/user/0/org.test.myapp/files/app', 'PYTHONPATH': '/data/user/0/org.test.myapp/files/app:/data/user/0/org.test.myapp/files/app/lib', 'PYTHONOPTIMIZE': '2', 'P4A_BOOTSTRAP': 'SDL2', 'PYTHON_NAME': 'python', 'P4A_IS_WINDOWED': 'True', 'P4A_ORIENTATION': 'portrait', 'P4A_NUMERIC_VERSION': 'None', 'P4A_MINSDK': '21', 'LC_CTYPE': 'C.UTF-8'})
07-28 13:01:29.267 20813 20853 I python  : Android kivy bootstrap done. __name__ is __main__
07-28 13:01:29.267 20813 20853 I python  : AND: Ran string
07-28 13:01:29.267 20813 20853 I python  : Run user program, change dir and execute entrypoint
07-28 13:01:29.398 20813 20853 I python  : [INFO   ] [Logger      ] Record log in /data/user/0/org.test.myapp/files/app/.kivy/logs/kivy_19-07-28_13.txt
07-28 13:01:29.399 20813 20853 I python  : [INFO   ] [Kivy        ] v1.11.0
07-28 13:01:29.399 20813 20853 I python  : [INFO   ] [Kivy        ] Installed at "/data/user/0/org.test.myapp/files/app/_python_bundle/site-packages/kivy/__init__.pyc"
07-28 13:01:29.399 20813 20853 I python  : [INFO   ] [Python      ] v3.7.1 (default, Jul  9 2019, 22:19:35)
07-28 13:01:29.399 20813 20853 I python  : [Clang 6.0.2 (https://android.googlesource.com/toolchain/clang 183abd29fc496f55
07-28 13:01:29.399 20813 20853 I python  : [INFO   ] [Python      ] Interpreter at "android_python"
07-28 13:01:29.854 20813 20853 I python  : [INFO   ] [Factory     ] 184 symbols loaded
07-28 13:01:30.135 20813 20853 I python  : [INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
07-28 13:01:30.175 20813 20853 I python  : [INFO   ] [Text        ] Provider: sdl2
07-28 13:01:30.179 20813 20853 I python  :  Traceback (most recent call last):
07-28 13:01:30.179 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/app/main.py", line 28, in <module>
07-28 13:01:30.179 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/builder.py", line 301, in load_file
07-28 13:01:30.180 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/builder.py", line 368, in load_string
07-28 13:01:30.180 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 401, in __init__
07-28 13:01:30.180 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 510, in parse
07-28 13:01:30.180 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 614, in parse_level
07-28 13:01:30.181 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 614, in parse_level
07-28 13:01:30.181 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 673, in parse_level
07-28 13:01:30.181 20813 20853 I python  :  TypeError: 'NoneType' object is not subscriptable
07-28 13:01:30.181 20813 20853 I python  : Python for android ended.
ahmetsedat0246@MSI:~$ adb logcat *:S python:D
- waiting for device -
--------- beginning of crash
--------- beginning of system
--------- beginning of main
07-28 13:01:29.230 20813 20853 I python  : Initializing Python for Android
07-28 13:01:29.230 20813 20853 I python  : Setting additional env vars from p4a_env_vars.txt
07-28 13:01:29.230 20813 20853 I python  : Changing directory to the one provided by ANDROID_ARGUMENT
07-28 13:01:29.230 20813 20853 I python  : /data/user/0/org.test.myapp/files/app
07-28 13:01:29.230 20813 20853 I python  : Preparing to initialize python
07-28 13:01:29.230 20813 20853 I python  : _python_bundle dir exists
07-28 13:01:29.230 20813 20853 I python  : calculated paths to be...
07-28 13:01:29.230 20813 20853 I python  : /data/user/0/org.test.myapp/files/app/_python_bundle/stdlib.zip:/data/user/0/org.test.myapp/files/app/_python_bundle/modules
07-28 13:01:29.230 20813 20853 I python  : set wchar paths...
07-28 13:01:29.265 20813 20853 I python  : Initialized python
07-28 13:01:29.265 20813 20853 I python  : AND: Init threads
07-28 13:01:29.266 20813 20853 I python  : testing python print redirection
07-28 13:01:29.267 20813 20853 I python  : Android path ['.', '/data/user/0/org.test.myapp/files/app/_python_bundle/stdlib.zip', '/data/user/0/org.test.myapp/files/app/_python_bundle/modules', '/data/user/0/org.test.myapp/files/app/_python_bundle/site-packages']
07-28 13:01:29.267 20813 20853 I python  : os.environ is environ({'PATH': '/sbin:/system/sbin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin', 'DOWNLOAD_CACHE': '/data/cache', 'ANDROID_BOOTLOGO': '1', 'ANDROID_ROOT': '/system', 'ANDROID_ASSETS': '/system/app', 'ANDROID_DATA': '/data', 'ANDROID_STORAGE': '', 'EXTERNAL_STORAGE': '/sdcard', 'ASEC_MOUNTPOINT': '/mnt/asec', 'BOOTCLASSPATH': '/system/framework/core-oj.jar:/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/bouncycastle.jar:/system/framework/apache-xml.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/android.hidl.base-V1.0-java.jar:/system/framework/android.hidl.manager-V1.0-java.jar:/system/framework/framework-oahl-backward-compatibility.jar:/system/framework/android.test.base.jar:/system/framework/featurelayer-widget.jar:/system/framework/hwEmui.jar:/system/framework/hwTelephony-common.jar:/system/framework/hwframework.jar:/system/framework/com.huawei.nfc.jar:/system/framework/org.ifaa.android.manager.jar:/system/framework/hwaps.jar:/system/framework/hwcustEmui.jar:/system/framework/hwcustframework.jar:/system/framework/hwcustTelephony-common.jar:/system/framework/servicehost.jar:/system/framework/hwIAwareAL.jar', 'SYSTEMSERVERCLASSPATH': '/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar:/system/framework/com.android.location.provider.jar:/system/framework/hwServices.jar:/system/framework/hwWifi-service.jar:/system/framework/hwcustServices.jar:/system/framework/hwcustwifi-service.jar', 'OEM_ROOT': '/product/hw_oem/POT-L01', 'ODM_PRODUCT': '/odm/hw_odm/POT-L01', 'CUST_POLICY_DIRS': '/system/emui/base:/system/emui/oversea:/system/emui/lite:/vendor/etc:/odm/etc:/product/etc:/odm/hw_odm/POT-L01:/product/region_comm/oversea:/product/hw_oem/POT-L01:/preload/POT-L01/hw/eu:/cust/global:/cust/hw/eu:/product/special_cust/POT-L01/hw/eu', 'ANDROID_SOCKET_zygote_secondary': '18', 'ANDROID_ENTRYPOINT': 'main.pyc', 'ANDROID_ARGUMENT': '/data/user/0/org.test.myapp/files/app', 'ANDROID_APP_PATH': '/data/user/0/org.test.myapp/files/app', 'ANDROID_PRIVATE': '/data/user/0/org.test.myapp/files', 'ANDROID_UNPACK': '/data/user/0/org.test.myapp/files/app', 'PYTHONHOME': '/data/user/0/org.test.myapp/files/app', 'PYTHONPATH': '/data/user/0/org.test.myapp/files/app:/data/user/0/org.test.myapp/files/app/lib', 'PYTHONOPTIMIZE': '2', 'P4A_BOOTSTRAP': 'SDL2', 'PYTHON_NAME': 'python', 'P4A_IS_WINDOWED': 'True', 'P4A_ORIENTATION': 'portrait', 'P4A_NUMERIC_VERSION': 'None', 'P4A_MINSDK': '21', 'LC_CTYPE': 'C.UTF-8'})
07-28 13:01:29.267 20813 20853 I python  : Android kivy bootstrap done. __name__ is __main__
07-28 13:01:29.267 20813 20853 I python  : AND: Ran string
07-28 13:01:29.267 20813 20853 I python  : Run user program, change dir and execute entrypoint
07-28 13:01:29.398 20813 20853 I python  : [INFO   ] [Logger      ] Record log in /data/user/0/org.test.myapp/files/app/.kivy/logs/kivy_19-07-28_13.txt
07-28 13:01:29.399 20813 20853 I python  : [INFO   ] [Kivy        ] v1.11.0
07-28 13:01:29.399 20813 20853 I python  : [INFO   ] [Kivy        ] Installed at "/data/user/0/org.test.myapp/files/app/_python_bundle/site-packages/kivy/__init__.pyc"
07-28 13:01:29.399 20813 20853 I python  : [INFO   ] [Python      ] v3.7.1 (default, Jul  9 2019, 22:19:35)
07-28 13:01:29.399 20813 20853 I python  : [Clang 6.0.2 (https://android.googlesource.com/toolchain/clang 183abd29fc496f55
07-28 13:01:29.399 20813 20853 I python  : [INFO   ] [Python      ] Interpreter at "android_python"
07-28 13:01:29.854 20813 20853 I python  : [INFO   ] [Factory     ] 184 symbols loaded
07-28 13:01:30.135 20813 20853 I python  : [INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
07-28 13:01:30.175 20813 20853 I python  : [INFO   ] [Text        ] Provider: sdl2
07-28 13:01:30.179 20813 20853 I python  :  Traceback (most recent call last):
07-28 13:01:30.179 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/app/main.py", line 28, in <module>
07-28 13:01:30.179 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/builder.py", line 301, in load_file
07-28 13:01:30.180 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/builder.py", line 368, in load_string
07-28 13:01:30.180 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 401, in __init__
07-28 13:01:30.180 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 510, in parse
07-28 13:01:30.180 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 614, in parse_level
07-28 13:01:30.181 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 614, in parse_level
07-28 13:01:30.181 20813 20853 I python  :    File "/home/vm/Desktop/Trink/.buildozer/android/platform/build/build/python-installs/myapp/kivy/lang/parser.py", line 673, in parse_level
07-28 13:01:30.181 20813 20853 I python  :  TypeError: 'NoneType' object is not subscriptable
07-28 13:01:30.181 20813 20853 I python  : Python for android ended.

It gives error TypeError: 'NoneType' object is not subscriptable
please help fast

@AndreMiras
Copy link
Member

"help fast" 😂
You should share your main.py fast then 😄
Anyway that doesn't feel like a buildozer error to me

@AhmetTarikulu
Copy link
Author

AhmetTarikulu commented Jul 29, 2019

Oh sorry, i am new to python and kivy so I dont know much about them.I dont know if thats a buildozer error or something but I made that app using buildozer and kivy so I thought there might be something with my buildozer.There is my main.py

import kivy
from kivy.app import *
from kivy.lang import *
from kivy.uix.gridlayout import *
from kivy.uix.screenmanager import *
from kivy.uix.floatlayout import *
from kivy.uix.label import *
from kivy.core.image import *
from kivy.graphics import *

class WelcomeScreen(Screen):
	pass
class Login_Register(Screen):
	pass
class Register(Screen):
	pass
class RegisterS(Screen):
	pass
class Login(Screen):
	pass
class LoginS(Screen):
	pass
class Home(Screen):
	pass
class WindowManager(ScreenManager):
	pass

kv= Builder.load_file("trink.kv")

class Trink(App):
	def build(self):
		return kv

if __name__ == "__main__":
	Trink().run()

I have not done anything different on my main.py so there is also my .kv file

#: import sm kivy.uix.screenmanager
WindowManager:
	transition: sm.NoTransition()
	WelcomeScreen:
	Login_Register:
	Register:
	RegisterS:
	Login:
	LoginS:
	Home:
<WelcomeScreen>:
	name:"first"		
	FloatLayout:
		Button:
			pos_hint:{"x":0.2,"y":0.15}
			size_hint: 0.6,0.1
			font_size:50
    		text: "Register"
    		color: (0.85,0.86,0.87,1)
    		background_normal: ''
    		background_color: 0.03,0.24,0.52,1
    		on_release:
    			app.root.current = "register"
    	Button:
    		pos_hint: {"x":0.2,"y":0.30}
    		size_hint:0.6,0.1
    		text: "Login"
    		font_size: 50
    		color: (0.85,0.86,0.87,1)
    		background_normal: ''
    		background_color: 0.03,0.24,0.52,1
    		on_release:
    			app.root.current = "login"
    	Button:
			pos_hint:{"x":0.2,"y":0.45}
			size_hint: 0.6,0.1
			font_size:50
    		text: "Start as Guest"
    		color: (0.85,0.86,0.87,1)
    		background_normal: ''
    		background_color: 0.03,0.24,0.52,1
    		on_release:
    			app.root.current = "home"
<Register>:
	name:"register"
<Login>:
	name:"login"
<Home>:
	name:"home"
    canvas.before:
        Rectangle:
            pos: 10,10
            size: 10,10
            source:"back.jpg"


I just trying to test buildozer first, make sure it works perfect and then I start to improve my app so I added only 3 buttons and nothing.

@AndreMiras
Copy link
Member

Looks like a parsing error of the kv file, but it's not too clear what's wrong to me.
When this happens the best is to try to simplify a max until it doesn't fail anymore. Then you may spot what the issue is.
But to me that doesn't look like a buildozer bug.

@AhmetTarikulu
Copy link
Author

Sorry like I said, I dont know much about python .kivy or buildozer so how to simplify a max. Sorry if this is a stupid question.

@AndreMiras
Copy link
Member

The idea is to simplify the code as much as possible until you see or don't see the error

@suvidh
Copy link

suvidh commented Jul 31, 2020

I am suffering from the same error.

@MocanuAlinD
Copy link

Try naming your main class something different, not Trink(App), try Example(App). Because kivy loads the kv file with the same name as your main class, and you load it again with the Builder.load_file("trink.kv"). If you have your kv file name different than your class name, then it loads the kv file with Builder. I dont know if this will fix the error, but sure you dont want to do it like this.
This is from the documentation:
-- By name convention: Kivy looks for a Kv file with the same name as your App class in lowercase, minus “App” if it ends with ‘App’
-- Builder: You can tell Kivy to directly load a string or a file. If this string or file defines a root widget, it will be returned by the method: Builder.load_file('path/to/file.kv') or: Builder.load_string(kv_string)

Full Docs here https://kivy.org/doc/stable/guide/lang.html

@github-actions
Copy link

👋 @AhmetTarikulu, we use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.
Let us know if this comment was made in error, and we'll be happy to reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants