Problem with gspread in Kivy as apk

283 views
Skip to first unread message

Wiktor Molzahn

unread,
Feb 15, 2021, 4:54:45 PM2/15/21
to Kivy users support
Kivy and gspread as apk

I have the problem, that when i compile my kivy skript with buildozer and my skript includes an import gspread the app crashes after the loading screen. I compiled the same skript one time without  importing gspread and it works (it was not used in the skript) and one time with importing gspread (it was also not used in the skript but just to find out what the problem is). The same skript crashes just because i import gspread.

My requirements are:
requirements = python3,kivy,kivymd,gspread,oauth2client,google-auth-oauthlib,httplib2,pyasn1,pyasn1-modules,rsa,requests,google

I woud be very thankfull if you i get help with this.

Robert

unread,
Feb 15, 2021, 6:28:22 PM2/15/21
to Kivy users support
'It crashes' is not actionable by anybody. Get some data.....

Run the debugger, search in the logcat output for 'Traceback'.
What follows is a Python stack trace, the last line of which is usually the most important.

Wiktor Molzahn

unread,
Feb 16, 2021, 12:24:07 PM2/16/21
to Kivy users support
Thank you for your quick attention.
For some reason i cant include the logcat.txt but the importent part is:

I/python:  Traceback (most recent call last):
       File "/content/.buildozer/android/app/main.py", line 4, in <module>
I/python:    File "/content/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/include/gspread/__init__.py", line 16, in <module>
I/python:    File "/content/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/include/gspread/auth.py", line 12, in <module>
I/python:  ModuleNotFoundError: No module named 'google'
    Python for android ended.
E/libc++abi: terminating
A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 11514 (SDLThread), pid 11240 (rg.test.include)

I hope you can heap me.

Robert

unread,
Feb 16, 2021, 12:51:29 PM2/16/21
to Kivy users support
I can't. This is not a tool issue, This is about understanding the packages used by your app, and I don't.

Look at the build log too, for warnings related google.

I notice it is referenced from a file named auth.py - so we can guess something secure is happening.

Also https://pypi.org/project/google/#description doesn't seem to be related to auth so maybe the
google package isn't the one you want, but something installed under google.whatever.
In which case the requirement 'google' is in error.

Change the tag to your version of gspread and see what is really missing

That might lead to oauthlib, suggesting the 'google' requirement was redundant, and the  issue is with google-auth-oauthlib, repeat the debugging process......

Wiktor Molzahn

unread,
Feb 22, 2021, 5:22:20 AM2/22/21
to Kivy users support
Ok after Days of try and error i got a solution.
The Problem was that Kivy coud not find the google packages.
So i was thinking if Kivy finds gspread than what happends when i compy the google packeges in to the gspread folder.
And it works

Its a rlly ugly solution but idk it works.

Thank you Robert for your help i appreciate your effort and your time.
Reply all
Reply to author
Forward
0 new messages