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

Holzauge20's avatar
Holzauge20
Explorer | Level 4
3 years ago

Dropbox upload via Python

The Dropbox upload via Python script file with the Raspberry Pi via the API  interface suddenly no longer works. Does anybody have the same Problem ?

  • This may be due to a recent change to our TLS configuration. Dropbox recently retired support for older versions of the TLS protocol, specifically 1.0 and 1.1. You'll need to make sure your app uses TLS 1.2. If you're using the Dropbox Python SDK, to use TLS 1.2 you'll need to update to at least v8.4.1 of that SDK (or preferably, the latest version which is currently v11.29.0).

     

    Otherwise, I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. In that case, please reply with:

    • the name and version number of the platform and SDK/library you are using, if any
    • the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
    • the full text of any error or unexpected output
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    This may be due to a recent change to our TLS configuration. Dropbox recently retired support for older versions of the TLS protocol, specifically 1.0 and 1.1. You'll need to make sure your app uses TLS 1.2. If you're using the Dropbox Python SDK, to use TLS 1.2 you'll need to update to at least v8.4.1 of that SDK (or preferably, the latest version which is currently v11.29.0).

     

    Otherwise, I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. In that case, please reply with:

    • the name and version number of the platform and SDK/library you are using, if any
    • the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
    • the full text of any error or unexpected output
    • Holzauge20's avatar
      Holzauge20
      Explorer | Level 4

      That was the solution. you helped me a lot.

      Thanks very much.

    • streetcodernate's avatar
      streetcodernate
      Explorer | Level 4

      This still isn't working for me. I am using version 11.30.0 and my code looks like this:

       

      def upload_file_to_dropbox(_file, file_name):
          dbx = get_dropbox_client()
          try:
              dbx.files_upload(_file.read(), '/CSV_UPLOADS/' + file_name)
              print(f'file {file_name} uploaded to dropbox')
          except Exception as e:
              print(e)
              return False

      what could be my issue?

       

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

        streetcodernate Can you elaborate on what you mean when you say it isn't working for you? What error or unexpected output are you getting?