Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App Engine import ssl Failed

I have an app engine app, and I am using the dropbox sdk and i get an error in the import ssl line.

Traceback

File "/base/data/home/apps/s~email-dropbox/1.363170643114750340/dropbox/rest.py", line 11, in <module> import ssl File "/base/python27_runtime/python27_dist/lib/python2.7/ssl.py", line 60, in <module> import _ssl # if we can't import it, let the error propagate ImportError: No module named _ssl

I understand that ssl.py is a wrapper around the SSL C library, and appEngine only handles pure python. However is there no way around this? or can anyone link me to a dropbox sdk which works on app engine?

like image 969
Ahmed Aeon Axan Avatar asked Oct 29 '25 08:10

Ahmed Aeon Axan


2 Answers

Late for the answer, but here is how you can import SSL libraries

In you app.yaml, add this

libraries:
- name: ssl
  version: latest

This worked for me.

like image 59
Ashwani Agarwal Avatar answered Oct 31 '25 20:10

Ashwani Agarwal


So I found a solution for this. I am posting this for anyone else who might run into the problem.

Google App Engine dosent support some python modules with relies on C backends like the ssl module and a few others. So you cannot use the original dropbox SDK with it. However the original SDK can be patched to work with AppEngine and a few people have already done it. I used this patched version by cklein it worked like a charm.

https://github.com/cklein/dropbox-client-python

like image 20
Ahmed Aeon Axan Avatar answered Oct 31 '25 22:10

Ahmed Aeon Axan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!