We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

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?