4

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?

2 Answers 2

8

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.

2
  • 1
    I ran into this problem using Tweepy on App Engine. Your solution worked. Thanks! Commented Nov 10, 2016 at 4:50
  • Well, this is a good solution, because it is easy and particularly clear. I've solved my trouble thank to you. Commented Apr 29, 2018 at 15:24
4

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.