Skip to content

TSC Flow Download fails intermittently #1251

Open

Description

@rozbear

Describe the bug
When I use the download function for a Flow in tableauserverclient under flows_endpoint.py, it fails intermittently.
I am just running it with the same flow id and path every time, it will run successfully a few times, then fail, then run .
I do NOT have this issue with the workbook download function.

Versions
Details of your environment, including:

  • Tableau Server version: 2021.3 (API 3.13)
  • Python version: 3.11.1
  • TSC library version: "^0.25"

To Reproduce
Below is the simple version of the code I am running - anything between <> would be replaced with actual values
If I just keep running this for 1 flow id over and over, it will succeed sometimes and fail sometimes.

import tableauserverclient as TSC

tableau_auth = TSC.PersonalAccessTokenAuth('<token_name>', '<token_secret>', site_id='<site_name>')
server = TSC.Server('https://<servername>.com/', use_server_version=True)

with server.auth.sign_in(tableau_auth):  
    server.flows.download("<flow_id>","<download_folder>/<flow_name>.tfl")

Results
when it fails I get the error in the attached screenshot.
See the part where it says "nonXMLResponseError: 'b"
from my debugging, I see the response I get is wrapped in single quotes with a b prefix - which in python denotes a byte string.
e.g.

b'
<?xml version=\'1.0\' encoding=\'UTF-8\'?>
<tsResponse xmlns="http://tableau.com/api" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tableau.com/api http://tableau.com/api/ts-api-3.13.xsd">
...<rest of xml here>... 
<tags/>
</flow>
</tsResponse>
'

Screenshot 2023-07-07 at 17 24 10

Activity

  1. TimothyVermeirenBiztory commented on Jan 16, 2024

    @TimothyVermeirenBiztory

    I've been seeing the same error lately. I was wondering whether it might have anything to do with the architecture of Tableau Server, and how processes "serving" a Flow for download might work on one node or not the other.

    I never thought that the problem might be with TSC, but... who knows? For what it's worth, I'm getting the exact same response ("The page you were looking could not be found") and overall behavior seems to match as well...

  2. github-actions commented on Aug 18, 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.

  3. github-actions commented on Sep 2, 2026

    @github-actions

    Closing due to inactivity. If this is still relevant, please reopen or file a new issue.

  4. jacalata commented on Oct 9, 2026

    @jacalata
    Contributor

    Likely the same server-side bug class as #1338: TSC maintainers (jorwoods) traced that one to Tableau Server mangling the Content-Disposition header on download when the item name contains multibyte characters — intermittent per-file (a given flow consistently succeeds or consistently fails), server-side, confirmed by Tableau support. The symptom here is different (a NonXMLResponseError wrapping what looks like a truncated/malformed response body rather than a missing header) but the shape matches: intermittent, not reproducible on demand, same download code path.

    Relabeling as Server-Side Enhancement rather than closing outright. If anyone can still reproduce this on a current TSC/Server version, a repro with the flow name (especially whether it has non-ASCII characters) would help confirm or rule out the #1338 connection.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions