Learn how to make the most out of the Dropbox Community here 💙. 

Forum Discussion

DaveP's avatar
DaveP
New member | Level 2
9 years ago
Solved

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.