Buildozer: One out of two RST-files 'not found' - [Errno 2]

45 views
Skip to first unread message

Henrik R.

unread,
Jan 6, 2020, 9:57:16 AM1/6/20
to Kivy users support
I have an app which uses 2 RST-files:
'intro1screen.rst'
and
'intro2screen.rst'

When I try to deploy the app on my android phone executing 'buildozer android debug deploy run' in Terminal, from the folder where the app is situated things seem to work, and the phone shows a black screen with: "Loading...", but after a few seconds it disappears.
Then I tried running:
adb logcat | grep "python"
in Terminal.
The most concrete information from that is the following: 

FileNotFoundError: [Errno 2] No such file or directory: '/data/data/org.test.myapp/files/app/intro2screen.rst'

But there is no error about 'intro1screen.rst' (which is the first RST-file mentioned in my KV-file).

Is there a bug in Buildozer or RST that prevents you from having more than one RTS-file?

Robert Flatt

unread,
Jan 6, 2020, 1:36:33 PM1/6/20
to Kivy users support
Is there a bug in Buildozer or RST that prevents you from having more than one RTS-file?
 
That is a pretty wild speculation. ;)

It probably just failed after the first file was not found.

ZenCODE

unread,
Jan 6, 2020, 2:41:11 PM1/6/20
to Kivy users support
Indeed. apps fail after the first error. It's probably trying to access that "rst" file first. Double check that logic, or even better, add the files to your build so it finds them! :-)

Good luck

Henrik R.

unread,
Jan 6, 2020, 4:53:54 PM1/6/20
to Kivy users support
OK. I checked, and it's true, that if I remove the reference to 'intro2screen.rst' then 'intro1screen.rst' becomes the problem.

But I still think it's a kind of bug in Buildozer, that it ignores RST-files in the folder where everything else is situated, including the buildozer.spec file.

Robert Flatt

unread,
Jan 6, 2020, 6:57:02 PM1/6/20
to Kivy users support
Assuming you checked that the .rst file is not in the apk (this is a key thing to check):

It is not a bug, it is a feature.Buildozer and p4a try to minimize the size of an apk by not including files that are typically unnecessary, a documentation file such as .rst probably qualifies. (I looked that the .p4a blacklist and it is not there, and I don't know what buildozer blacklists)

Assuming the file is not in the apk because it is in a blacklist, look at creating a whitelist, and specify it in buildozer.spec

However if the .rst is in the apk then the issue is how it is referenced from the app, so check if it is in the apk so you don't waste time trying to address the wrong issue.

Henrik R.

unread,
Jan 7, 2020, 5:24:40 AM1/7/20
to Kivy users support
In the 'bin' sub-folder of my project I found "myapp__armeabi-v7a-0.1-armeabi-v7a-debug.apk". It doesn't seem to contain my rst-files, so I included the following in the buildozer.spec:

# (list) Pattern to whitelist for the whole project
android.whitelist = *.rst

I also tried:
android.whitelist = '*.rst'

But I must be using the wrong format/syntax, because that didn't help. What is the right format/syntax?


Robert Flatt

unread,
Jan 7, 2020, 12:26:19 PM1/7/20
to Kivy users support
The files will be inside private.mp3 , see instructions link above. Be certain about this.

I do not know if there is any special syntax.

Henrik R.

unread,
Jan 7, 2020, 1:20:27 PM1/7/20
to Kivy users support
Oops - I didn't see the paragraph on 'private.mp3', but unpacking that gives no rst-files either. So the question is still how to whitelist them in buildozer.spec?

Henrik R.

unread,
Jan 8, 2020, 7:07:30 AM1/8/20
to Kivy users support
Since the subject-line of this thread doesn't really describe the problem, I have created a new thread "Buildozer.spec: 'android.whitelist' What's the syntax?" - https://groups.google.com/forum/#!topic/kivy-users/HetHQ4HrTGM

Moqing Yu

unread,
Apr 4, 2020, 3:23:46 AM4/4/20
to kivy-...@googlegroups.com
The log file show the .rst file not packed in the app, please try to using 
"source.include_exts" to include the "rst" subffix or "source.include_patterns" to include "*.rst"
 in buildozer.spec

Henrik R. <henrik.r...@gmail.com> 于 2020年1月6日周一 下午10:57写道:
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5067ef03-6830-482e-8d12-7a551f483b40%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages