OSError: Starting path not found.

598 views
Skip to first unread message

Avishek Sharma

unread,
Dec 24, 2022, 6:47:45 PM12/24/22
to Kivy users support
Hi, greetings. 
I have been using kivy to make an OpenAI app and recently fall into an unexpected error, that might seem to be related to the OS. 
here is the logcat file screenshot. 

Logcat.png

The issue  seems to be caused by the load_dotenv function. 
here are the project files and the bulldozer spec file. 
Can you please help me solve the error ? 

Thank you. 
Spec File.txt
OpenAIProject.rar

berk berk

unread,
Dec 26, 2022, 4:29:40 PM12/26/22
to Kivy users support
yes it seems reason by "load_dotenv" function. I didn't used this module but probably this function pull environment variables from .env file.
I know your codes are running on Desktop successfully. Because your ".env" file location represented in folder. I think this .env file doesn't include on apk like other ttf(type font files). Normally, if you put on building apk folder of your  font name file, automatically includes on app this font file without define any path on phone storage. But I don't sure, you have to define path for this ".env" file, or add ".env" on buildozer needed place (.png, .jpg, .ttf...extension). 

If you think problem is at it. you can try to check manually. so put .env file mobile phone storage(-Android phone-) and define needed path as " /sdcard/<createdfilefortest>/.env.env" do not forget extension ".env" and give needed permissions for reach on storage. like this thing,

from android.permissions import request_permissions, Permission

request_permissions([Permission.READ_EXTERNAL_STORAGE, Permission.WRITE_EXTERNAL_STORAGE])


 
25 Aralık 2022 Pazar tarihinde saat 02:47:45 UTC+3 itibarıyla avisheksh...@gmail.com şunları yazdı:

Robert

unread,
Dec 26, 2022, 6:52:00 PM12/26/22
to Kivy users support
The issue appears in (the package?) dotenv.
It appears to be searching for the root of a POSIX file system, which Android does not have, so it complains about "starting path".
<https://github.com/Android-for-Python/Android-for-Python-Users#what-is-different-about-android>

Presumably the simple answer is the package is not portable, your creativity may find some workaround.

Avishek Sharma

unread,
Dec 29, 2022, 10:16:36 AM12/29/22
to Kivy users support
Ok. Thanks for the help. 
I will surely try your solution. 
Thank you again Robert and cing. 

Reply all
Reply to author
Forward
0 new messages