You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

DaveP's avatar
DaveP
New member | Level 2
8 years ago

Certificate Issue using put_file?

Hi guys, we have an app that was working fine yesterday, but now when we use the client.put_file method we're getting a certificate verification error. Stack trace below -- any ideas please? I've rechecked our app key and secret and all looks correct. As i say, everything was fine yesterday. What a difference a day makes... ;)

 

File "/home/clicadmin/CLIC_Deployment_Scripts/build_utils/mis_manager.py", line 97, in do_put
self.api_client.put_file(self.current_path + "/" + to_path, from_file, overwrite=True)
File "build/bdist.linux-x86_64/egg/dropbox/client.py", line 321, in put_file
File "build/bdist.linux-x86_64/egg/dropbox/rest.py", line 264, in PUT
File "build/bdist.linux-x86_64/egg/dropbox/rest.py", line 210, in PUT
File "build/bdist.linux-x86_64/egg/dropbox/rest.py", line 176, in request
dropbox.rest.RESTSocketError: Error connecting to "api-content.dropbox.com": [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

  • Hi Dave, it sounds like you're using an old version of the API v1 Python SDK, with an outdated certificate file.

     

    We reached out to developers using old SDKs like this last year to warn of this change, but it sounds like that email didn't make it to you unfortunately.

     

    In any case, you should be able to fix this by just upgrading the version of the Python SDK you're using (to get the current certificate file). E.g., if you're using pip, that would a matter of running:

     

    pip install dropbox --upgrade

     

    Also, unrelated, I should note that based on your stack trace, it looks like you're still using API v1, which is itself deprecated. You should move to API v2 when you can. There's functionality for both API v1 and API v2 in the latest version of the Python SDK. You can find instructions on using API v2 functionality in the latest version of the Python SDK readme on GitHub.

     

     

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Hi Dave, it sounds like you're using an old version of the API v1 Python SDK, with an outdated certificate file.

     

    We reached out to developers using old SDKs like this last year to warn of this change, but it sounds like that email didn't make it to you unfortunately.

     

    In any case, you should be able to fix this by just upgrading the version of the Python SDK you're using (to get the current certificate file). E.g., if you're using pip, that would a matter of running:

     

    pip install dropbox --upgrade

     

    Also, unrelated, I should note that based on your stack trace, it looks like you're still using API v1, which is itself deprecated. You should move to API v2 when you can. There's functionality for both API v1 and API v2 in the latest version of the Python SDK. You can find instructions on using API v2 functionality in the latest version of the Python SDK readme on GitHub.

     

     

    • DaveP's avatar
      DaveP
      New member | Level 2

      Star man, that was it thanks. Tbh I'd ruled that out, as the dropbox warnings about the API changing were for around June 2017.  And I'm sure we had upgraded the SDK when the warnings first came out. Obviously not, our bad.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,912 PostsLatest Activity: 9 hours ago
333 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!