Skip to main content

I'm using Tableau prep from the server when I create a flow and add a Python script it shows the time-out

python works to decryption data  

it's Different when I do in Tableau prep desktop version

caution: python script decryption 300k row 

need a help

2 answers
  1. May 11, 2024, 7:41 PM

    @ahmed mohamed​ 

    Hi, have you tried increasing the timeout and using a Tabpy config file (look line 35, in this case I have increased to 600 seconds)

    [TabPy]

    # TABPY_QUERY_OBJECT_PATH = /tmp/query_objects

    # TABPY_PORT = 9004

    # TABPY_STATE_PATH = ./tabpy/tabpy_server

     

    # Where static pages live

    # TABPY_STATIC_PATH = ./tabpy/tabpy_server/static

     

    # For how to configure TabPy authentication read

    # Authentication section in docs/server-config.md.

    # TABPY_PWD_FILE = /home/casucau/tabpypwd.txt

     

    # To set up secure TabPy uncomment and modify the following lines.

    # Note only PEM-encoded x509 certificates are supported.

    # TABPY_TRANSFER_PROTOCOL = https

    # TABPY_CERTIFICATE_FILE = /path/to/certificate/file.crt

    # TABPY_KEY_FILE = /path/to/key/file.key

     

    # Log additional request details including caller IP, full URL, client

    # end user info if provided.

    # TABPY_LOG_DETAILS = true

     

    # 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 = 100

     

    # Enable evaluate api to execute ad-hoc Python scripts

    # Enabled by default. Disabling it will result in 404 error.

    # TABPY_EVALUATE_ENABLE = true

     

    # Configure how long a custom script provided to the /evaluate method

    # will run before throwing a TimeoutError.

    # The value should be a float representing the timeout time in seconds.

    TABPY_EVALUATE_TIMEOUT = 600

     

    [loggers]

    keys=root

     

    [handlers]

    keys=rootHandler,rotatingFileHandler

     

    [formatters]

    keys=rootFormatter

     

    [logger_root]

    level=DEBUG

    handlers=rootHandler,rotatingFileHandler

    qualname=root

    propagete=0

     

    [handler_rootHandler]

    class=StreamHandler

    level=INFO

    formatter=rootFormatter

    args=(sys.stdout,)

     

    [handler_rotatingFileHandler]

    class=handlers.RotatingFileHandler

    level=DEBUG

    formatter=rootFormatter

    args=('tabpy_log.log', 'a', 1000000, 5)

     

    [formatter_rootFormatter]

    format=%(asctime)s [%(levelname)s] (%(filename)s:%(module)s:%(lineno)d): %(message)s

    datefmt=%Y-%m-%d,%H:%M:%S

    and also, you should start tabpy with with the --config option and the path where your config file is:

    tabpy --config="D:\Tabpy\default.conf"

    If this post resolves the question, would you be so kind to "Select as Best"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.

     

    Regards,

     

    Diego Martinez

    Tableau Visionary and Forums Ambassador

0/9000