Skip to content

Can not download datasources that are not in project #785

Closed

Description

@DaniilBalabanov33N

A duplication of #293 but it was closed by the author with no solution provided

For some reason datasources in workbooks can only be found by ID and can not be downloaded

ds = server.datasources.get_by_id("d5c9def5-61f0-49ce-a860-d688edf28f6e")
server.datasources.populate_connections(ds)
ds 
>>> <tableauserverclient.models.datasource_item.DatasourceItem object at 0x000001D587581BB0>
path = server.datasources.download(ds.id)
>>>tableauserverclient.server.endpoint.exceptions.ServerResponseError:
>>>   404004: Resource Not Found
>>>            Datasource "d5c9def5-61f0-49ce-a860-d688edf28f6e" could not be found

Also, if I retrieve all datasources from the server it's not there

temp_list = [ds for ds in TSC.Pager(server.datasources.get) if ds.id == "d5c9def5-61f0-49ce-a860-d688edf28f6e"]:
temp_list
>>> []

Activity

  1. m4n1-code commented on Apr 14, 2021

    @m4n1-code

    I am facing the same issue. Has there been any solution to this?
    Thanks

  2. henrihapponen commented on Jun 16, 2022

    @henrihapponen

    Facing the same issue:

    • Datasource exists
    • Permissions are set correctly (for example ExtractXml=Allow)
    • Still getting error 404004 "Data source not found"

    Any updates on this?
    Thanks

  3. jacalata commented on Feb 14, 2023

    @jacalata
    Contributor

    I think this question is asking about embedded data sources. These are published as part of the workbook, and cannot be downloaded separately - you have to download the workbook as a complete twbx file.

  4. added and removed
    needs investigationIssue needs to be looked at by Tableau
    on Feb 14, 2023
  5. SathyanarayanaGowda commented on Feb 8, 2024

    @SathyanarayanaGowda

    Hi @jacalata , Can you please check this again. Since as per the Tableau REST API documentation for Download Data Source, this method should download the datasource in .tdsx format and not twbx file.

    Tableau REST API URL - https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#download_data_source

    tdsx zip file contains the datasource extract which contains all the data extracted from backend database for that specific workbook.

    Also the tableauserverclient method below is the python wrapper for the above API and its documentation also state the same.

    tableauserverclient URL - https://tableau.github.io/server-client-python/docs/api-ref#datasourcesdownload

    Downloads the specified data source in .tdsx or .hyper format..

    but it is not working as per the REST API specification.

  6. jacalata commented on Jun 18, 2026

    @jacalata
    Contributor

    This was fixed in two stages:

    1. v0.29 (PR Jorwoods/1312 download hotfix #1330): added fix_filename() to handle RFC 5987 filename*=UTF-8'' format in Content-Disposition headers, which addressed the main failure mode
    2. Unreleased (PR Remove deprecated cgi module and clean up related dead code #1771): removed the cgi module entirely, replacing cgi.parse_header() with email.message.Message.get_filename(failobj="") — now returns an empty string gracefully when no filename is present

    Will be fully resolved in v0.41.

  7. github-actions commented on Aug 17, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.

  8. jacalata commented on Aug 25, 2026

    @jacalata
    Contributor

    Closing — this is fixed as of v0.41 for the "download fails when the datasource is not in a normal project" case. Datasources.download (datasources_endpoint.py:235) delegates to DownloadableMixin._download_content (endpoint.py:338-381), which now parses the Content-Disposition header via email.message.Message.get_filename() — handles the RFC 5987 filename*=UTF-8'' form the server returns for personal-space and other non-project locations. Please open a fresh issue if you're still hitting a 404 on a supported TSC/Server version.

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