KNOWLEDGE BASE

Error "Content-length Too Long" Occurs When Using Python Script in Tableau Prep


Published: 13 Jul 2021
Last Modified Date: 14 Jul 2021

Issue

When running Python Script in Prep, Then the error occurs in CLI.

Content-Length too long

Environment

  • Tableau Prep

Resolution

Manually create a configuration file for Tabpy and start Tabpy with the configuration file.
The steps are as follows:

1. Create a Configuration File like the attached file with the appropriate data size.
=========
[TabPy]

# Limit request size (in Mb) - any request which size exceeds
# specified amount will be rejected by TabPy.
# Default value is 100 Mb.
TABPY_MAX_REQUEST_SIZE_MB = 1000
=========

2. Start Tabpy with the command below.
=========
tabpy --config=path/to/my/config/file.conf
=========
*After executing the above command, you will see "INFO:tabpy.tabpy_server.app.app:Web service listening on port 9004" at the end to confirm that tabpy has been started.

3. Open Tableau Prep and run the flow.

Cause

The Default size of the Maximal request size supported by TabPy is 100 MB.
Did this article resolve the issue?