Will
Will

Reputation: 1068

SSLError in Requests module on Android

I am writing a Kivy app for Android, packaged with buildozer. The app authenticates with a web service using the requests module. However, upon attempting to log in, it throws an exception:

I/python  ( 1214):    File "/home/kivy/src/.buildozer/android/app/_applibs/requests/se
ssions.py", line 471, in request
I/python  ( 1214):    File "/home/kivy/src/.buildozer/android/app/_applibs/requests/se
ssions.py", line 579, in send
I/python  ( 1214):    File "/home/kivy/src/.buildozer/android/app/_applibs/requests/ad
apters.py", line 430, in send
I/python  ( 1214):  requests.exceptions.SSLError: Can't connect to HTTPS URL because the SSL module is not available.
I/python  ( 1214): Python for android ended.

Note that if I run the app on my Windows machine, it works fine.

SSL appears to be part of the standard library, so I was under the impression that I shouldn't have to add SSL to the requirements in buildozer.spec. Nevertheless, I tried adding it there, and it failed to build entirely.

Since the requests module is actually listed as an example at http://buildozer.readthedocs.org/en/latest/specifications.html#section-app, I would anticipate that someone must have had it working at some point.

Is there some other setting I need to use in the buildozer.spec, or somewhere else, to get the module working properly? Or is there just no way to get it working with https?

Upvotes: 0

Views: 959

Answers (1)

inclement
inclement

Reputation: 29458

Try adding openssl to the requirements.

Upvotes: 1

Related Questions