debug _python_bundle

47 views
Skip to first unread message

mehdi alizade

unread,
Dec 2, 2020, 4:49:47 PM12/2/20
to Kivy users support
In this code I have used PNG images and TTF fonts and a few additional libraries. I got the apk file well, using buildozer. But the software didn't run. I used adb logcat *:S python to find the problem. I encountered this error:
"_python_bundle does not exist...this not looks good, all python recipes should have this folder, should we expect a crash soon?"
Has anyone encountered this problem?
Thank you in advance for your help

planckp...@gmail.com

unread,
Dec 2, 2020, 6:30:46 PM12/2/20
to Kivy users support
Remove the 'python'

mehdi alizade

unread,
Dec 2, 2020, 9:00:08 PM12/2/20
to Kivy users support
I had installed the termux software and Python was installed on the phone with it. Do you mean this Python installed on the phone?
Although I deleted this software now, my software still did not run.
Please give me more description?

planckp...@gmail.com

unread,
Dec 2, 2020, 10:15:21 PM12/2/20
to Kivy users support
I was trying to say type    adb logcat *:S

But it sounds like you wanted to use Termux, no I idea if that is possible.

The normal usage is to connect a desktop via usb, enable developer mode and usb debugging on phone ;
and run adb from the desktop.

mehdi alizade

unread,
Dec 3, 2020, 9:23:11 AM12/3/20
to Kivy users support
No, I don't want to use Thermux.
As usual, I want to debug the APK file. I had no problem with the buildozer and I got the output. But it doesn't run on the phone. When opening in the phone, the message: "could not extract private data" Comes in the form of a toast message. In Teminal and CMD also has the error I mentioned earlier.
I have used different images and fonts in the app. Of course, I added new libraries and "PNG" and "TTF" to *.spec. But  Is it possible that I should have added other option to the spec file?

planckp...@gmail.com

unread,
Dec 3, 2020, 12:50:06 PM12/3/20
to Kivy users support
OK Termux was irrelevant.

I don't understand,  did removing python from the adb command addressed the previous issue?

Do you get "could not extract.." when from the desktop CMD without using 'python' in the adb command?

Try unpacking the apk to see if anything is missing

mehdi alizade

unread,
Dec 3, 2020, 5:37:08 PM12/3/20
to Kivy users support
No, When opening in the Android phone,"could not extract private data" Comes in the form of a toast message.
Now I tested it by simple code, Just shows "Hello World". But it have same problem.

Alexander Taylor

unread,
Dec 3, 2020, 6:29:30 PM12/3/20
to Kivy users support
This probably indicates a failure to extract the bundled tarball. This could be because e.g. your root partition is full. There may be more information in the logcat output, if you post it all we can check.

mehdi alizade

unread,
Dec 5, 2020, 10:05:58 AM12/5/20
to Kivy users support
I found the main problem.
One of the libraries is not known.
The library is "arabic-reshaper". 
Line 18 has been imported this library.
Do you know how to solve the problem?
This is my Errors:
12-05 17:29:34.230  9868  9913 I python  :  Traceback (most recent call last):
12-05 17:29:34.231  9868  9913 I python  :    File "/media/mehdi/2436ef15-26cf-4be8-9eed-6befb73eddd8/mehdi/Documents/BuildozerTest/.buildozer/android/app/main.py", line 18, in <module>
12-05 17:29:34.231  9868  9913 I python  :    File "/media/mehdi/2436ef15-26cf-4be8-9eed-6befb73eddd8/mehdi/Documents/BuildozerTest/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/FinalAPP/arabic_reshaper/__init__.py", line 12, in <module>
12-05 17:29:34.232  9868  9913 I python  :  FileNotFoundError: [Errno 2] No such file or directory: '/data/user/0/org.test.finalapp/files/app/_python_bundle/site-packages/arabic_reshaper/__version__.py'
12-05 17:29:34.232  9868  9913 I python  : Python for android ended.

planckp...@gmail.com

unread,
Dec 5, 2020, 12:17:26 PM12/5/20
to Kivy users support
To include a package, include it the the requirements field in buildozer.spec
You will be telling buildozer what pip packages you installed on the desktop to get the app to run there, so it knows to install them in the app.

mehdi alizade

unread,
Dec 5, 2020, 2:48:03 PM12/5/20
to Kivy users support

I have already added additional libraries to the *.spec file. But there is still this problem.
The bulldozer did not just install this library, "arabic-reshaper"

# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
requirements = python3,kivy,sockets,arabic-reshaper,plyer,python-bidi,kivymd



planckp...@gmail.com

unread,
Dec 5, 2020, 4:39:05 PM12/5/20
to Kivy users support
I don't know why that would be.
I know others use it, search these messages - perhaps there is a clue.
Reply all
Reply to author
Forward
0 new messages