Skip to content

Unable to run simple task with updown.py example file #585

Open

Description

@mpec-vrtalbot

I'm trying to learn the Python Dropbox SDK and as part of this effort, I downloaded updown.py and tried a simple sample sync task.

I kept getting the following error:
....dropbox\Lib\site-packages\stone\backends\python_rsrc\stone_serializers.py", line 674, in decode_union_dict
raise bv.ValidationError(
stone.backends.python_rsrc.stone_validators.ValidationError: unexpected use of the catch-all tag 'other'

I also persistently got the following error when I didn't get the "catch-all tag" error:
....dropbox\Lib\site-packages\requests\adapters.py", line 711, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host'))

I've scoured the web for solutions. I've tried uploading in batches with no success. I've tried multiple versions of the upload function and now I am at a loss.

The only minor change I made to the file was to reorient the Dropbox client to allow it to see my team folder. I am also not entirely sure I got the app permissions correct. I checked files.metadata.read and "Allow" for public clients.

I am attaching t

updown_v1.py
updown.py
updown_v2.py

hree versions of the file which have not worked for me. Could you please help me figure this out? I am really struggling and I can't find answers online.

My libraries are all brand new, installed in a virtual environment two days ago. My Python version is 3.12.10

Activity

  1. mpec-vrtalbot commented on Aug 27, 2026

    @mpec-vrtalbot
    Author

    Output of "pip list" in my virtual environment:
    Package Version


    certifi 2026.7.22
    charset-normalizer 3.5.1
    colorama 0.4.6
    dropbox 12.2.1
    idna 3.19
    Jinja2 3.1.6
    MarkupSafe 3.0.3
    packaging 26.3
    pip 26.2.1
    requests 2.34.2
    six 1.17.0
    stone 3.5.4
    tqdm 4.70.0
    urllib3 2.7.0

  2. greg-db commented on Aug 28, 2026

    @greg-db
    Contributor

    Thanks for the report. These don't reproduce for me, but for reference, is that the full error output you're getting? Please share the full stack traces if possible.

    That first error may indicate an issue with the response that the server is sending; the full stack trace may help us track down which call is producing that.

    As for the second issue, the Dropbox API servers shouldn't just close a connection; if the API rejects a call it would return some error response at least. This may instead indicate a network issue, such as network instability, or a firewall or proxy issue. Please check if there's something that may be interfering with your network connection. (Note though that this sample uses the files_upload method which only supports uploading files up to 150 MB in size.)

    Thanks!

  3. mpec-vrtalbot commented on Aug 28, 2026

    @mpec-vrtalbot
    Author

    Thank you very much for your prompt reply. I greatly appreciate your work maintaining this module.

    Here is the full stack trace from the "catch-all tag" error. I haven't seen the connection error yet today, but I can post that if it starts up again. Also I tried the file_transfer.py script and it was also not working for me. It couldn't import the file_transfer commands, so I re-installed the dropbox module by cloning the repo and created a new environment. But then it still wouldn't run - it kept getting a "file not found" error. I am wondering if the two issues might be related. I included that stack trace as well at the bottom in case it provides some insight. I'll keep trying to troubleshoot it and I can create another ticket for that if I can't get it to work.

    New virtual environment

    Package Version


    certifi 2026.7.22
    charset-normalizer 3.5.1
    colorama 0.4.6
    dropbox 12.2.2.dev18+g9ed834d80
    idna 3.19
    Jinja2 3.1.6
    MarkupSafe 3.0.3
    packaging 26.3
    pip 26.2.1
    requests 2.34.2
    six 1.17.0
    stone 3.5.4
    tqdm 4.70.0
    urllib3 2.7.0

    Error trace from updown.py

    Traceback (most recent call last):
    File "C:\Users\vrt2\Downloads\updown.py", line 293, in
    main()
    File "C:\Users\vrt2\Downloads\updown.py", line 119, in main
    upload(dbx, fullname, folder, subfolder, name)
    File "C:\Users\vrt2\Downloads\updown.py", line 197, in upload
    print(dbx.files_upload(f.read(), path))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\vrt2.db\Lib\site-packages\dropbox\base.py", line 3320, in files_upload
    r = self.request(
    ^^^^^^^^^^^^^
    File "C:\Users\vrt2.db\Lib\site-packages\dropbox\dropbox_client.py", line 342, in request
    res = self.request_json_string_with_retry(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\vrt2.db\Lib\site-packages\dropbox\dropbox_client.py", line 548, in request_json_string_with_retry
    return self.request_json_string(
    ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\vrt2.db\Lib\site-packages\dropbox\dropbox_client.py", line 686, in request_json_string
    self.raise_dropbox_error_for_resp(r)
    File "C:\Users\vrt2.db\Lib\site-packages\dropbox\dropbox_client.py", line 729, in raise_dropbox_error_for_resp
    err = stone_serializers.json_compat_obj_decode(AuthError_validator, res.json()["error"])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\vrt2.db\Lib\site-packages\stone\backends\python_rsrc\stone_serializers.py", line 973, in json_compat_obj_decode
    return decoder.json_compat_obj_decode_helper(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\vrt2.db\Lib\site-packages\stone\backends\python_rsrc\stone_serializers.py", line 559, in json_compat_obj_decode_helper
    return self.decode_union(data_type, obj)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\vrt2.db\Lib\site-packages\stone\backends\python_rsrc\stone_serializers.py", line 654, in decode_union
    tag, val = self.decode_union_dict(data_type, obj)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\vrt2.db\Lib\site-packages\stone\backends\python_rsrc\stone_serializers.py", line 674, in decode_union_dict
    raise bv.ValidationError(
    stone.backends.python_rsrc.stone_validators.ValidationError: unexpected use of the catch-all tag 'other'

    Run command for updown.py (in case I'm formatting it wrong somehow)

    python updown.py --token "MY_ACCESS_TOKEN" "/MPEC/MPEC Model Resources/Model Tools/Cluster Tool" "Y:\TestSync\Cluster Tool"

    Error trace from file_transfer.py

    (.db) C:\Users\vrt2>python Downloads\file_transfer_wToken.py
    Traceback (most recent call last):
    File "C:\Users\vrt2\Downloads\file_transfer_wToken.py", line 85, in
    main()
    File "C:\Users\vrt2\Downloads\file_transfer_wToken.py", line 60, in main
    download_result = Downloader(dbx).download(
    ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\vrt2.db\Lib\site-packages\dropbox\file_transfer.py", line 334, in download
    return self._download_sequential(remote_path, target, max_attempts, options.progress)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\vrt2.db\Lib\site-packages\dropbox\file_transfer.py", line 373, in _download_sequential
    metadata_response, body = self._download_range_retryable(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\vrt2.db\Lib\site-packages\dropbox\file_transfer.py", line 565, in _download_range_retryable
    metadata, body = self.client.files_download(remote_path)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\vrt2.db\Lib\site-packages\dropbox\base.py", line 1524, in files_download
    r = self.request(
    ^^^^^^^^^^^^^
    File "C:\Users\vrt2.db\Lib\site-packages\dropbox\dropbox_client.py", line 372, in request
    raise ApiError(
    dropbox.exceptions.ApiError: ApiError('5410295fadd7470cba2195f36a91b196', DownloadError('path', LookupError('not_found', None)))

  4. greg-db commented on Aug 28, 2026

    @greg-db
    Contributor

    Thanks, that's helpful. Can you also confirm if you only see the ValidationError when attempting to upload to the team folder? Does it work otherwise? Also, are you using an account on a team with encryption enabled?

    As for the "path/not_found" error, a "path/not_found" Dropbox API error indicates that the API call failed because there was nothing currently found at the specified path in the connected account under the relevant root. For example, this can happen if there's a mistake or typo in the path value the app supplies, if the file/folder has been renamed, moved, or deleted from that path, if the app is not connected to the correct account for that particular path, etc.

    When specifying the path, make sure you provide the full and accurate path for the desired file under the relevant root. For example, if you have a file named "example.csv" inside a folder named "folder", the path would be "/folder/example.csv". You can find more information on path formats here.

    Here are several things you can check in particular to debug this:

    • Make sure you're using a currently accurate path value: You can use files_list_folder and files_list_folder_continue to list the contents of a folder so you can check what the correct path values would be for items in those folder(s). To list the root, set path to the empty string "" when calling files_list_folder. You can use the path_lower or id values returned for the files/folders in that folder to interact with those files/folders.

    • Make sure you're connected to the correct account for the path value you're using: You can use users_get_current_account to check which account the app is connected to.

    • Make sure you're using app folder-relative paths, if your app is registered for the "app folder" access type: Apps with the "app folder" access type can only access the contents of the special app folder that gets automatically created for it. If your app has the "app folder" access type, then it will only be able to access files in the app folder, and the root for any path value supplied by that app will automatically be the app folder root. You can find more information on app permissions here. For example, If your app has the app folder access type and you're trying to access something you can see on the Dropbox web site at "/Apps//folder/example.csv", you should only send the path value as "/folder/example.csv". Alternatively, if your app is registered for the "app folder" access type but you need to access contents outside the app folder, you'll need to use a different app registration with the full Dropbox access type instead.

    • Make sure you're accessing the relevant root: When using an app with the "full Dropbox" access type, API calls default to the member folder, but if you're trying to access the "team space" (only applicable to members of a team with the "team space" configuration), you'll need to configure that as the root explicitly, as covered in the Team Files Guide.

  5. AndreyVMarkelov commented on Oct 22, 2026

    @AndreyVMarkelov
    Contributor

    Hi @mpec-vrtalbot,

    Could you please try reproducing this issue using the latest release of the Dropbox Python SDK?

    You can upgrade using:

    python -m pip install --upgrade dropbox

    Please let us know if you’re still experiencing the issue. If so, it would be helpful to share the updated stack trace and SDK version.

    Thanks!

  6. mpec-vrtalbot commented on Oct 22, 2026

    @mpec-vrtalbot
    Author

    Thank you very much for this notification and instructions. I will try this out as soon as I have time and then I will report to you on the outcome. I really appreciate your work on this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions