You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can not download datasources that are not in project #785
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
>>> []
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.
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.
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
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
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.
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.
Activity
m4n1-code commentedon Apr 14, 2021
I am facing the same issue. Has there been any solution to this?
Thanks
henrihapponen commentedon Jun 16, 2022
Facing the same issue:
Any updates on this?
Thanks
jacalata commentedon Feb 14, 2023
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.
SathyanarayanaGowda commentedon Feb 8, 2024
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.
jacalata commentedon Jun 18, 2026
This was fixed in two stages:
fix_filename()to handle RFC 5987filename*=UTF-8''format inContent-Dispositionheaders, which addressed the main failure modecgimodule and clean up related dead code #1771): removed thecgimodule entirely, replacingcgi.parse_header()withemail.message.Message.get_filename(failobj="")— now returns an empty string gracefully when no filename is presentWill be fully resolved in v0.41.
github-actions commentedon Aug 17, 2026
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.
jacalata commentedon Aug 25, 2026
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 toDownloadableMixin._download_content(endpoint.py:338-381), which now parses theContent-Dispositionheader viaemail.message.Message.get_filename()— handles the RFC 5987filename*=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.