tableau / TabPy

Execute Python code on the fly and display results in Tableau visualizations:
https://tableau.github.io/TabPy/
MIT License
1.55k stars 592 forks source link

TabPy. null error in prep flow #556

Closed tb582 closed 1 year ago

tb582 commented 2 years ago

I get this error in tableau prep 2022.1.2 System error: Unknown Error when setting up request to TabPy. null

tabpy logs running locally

2022-06-14,16:02:19 [INFO] (base_handler.py:base_handler:115): function to evaluate=def _user_script(tabpy, _arg1):
<my py file>
execution_result = cuecompare(pd.DataFrame(_arg1))
 return execution_result.to_dict(orient='list') if isinstance(execution_result, pd.DataFrame) else execution_result
, <<call ID: 38505919-ca65-48a3-aa1c-e9d2efb40704>>
2022-06-14,16:02:19 [INFO] (web.py:web:2239): 200 POST /evaluate (127.0.0.1) 81.94ms

then it just hangs at the last line.

nmannheimer commented 2 years ago

How large is the dataset you're passing?

I'd also suggest filing a support ticket with Tableau.

tb582 commented 2 years ago

not sure how to tell but in theory fairly large 100K rows

I'd also suggest filing a support ticket with Tableau.

filing a ticket with tableau support is like talking to a brick wall - want to make sure I'm not missing anything first as that route is a long road.

nmannheimer commented 2 years ago

The first thing I'd try is setting the timeout parameter much higher in TabPy, it may be timing out.

nmannheimer commented 2 years ago

Is Prep crashing or just hanging?

tb582 commented 2 years ago

The first thing I'd try is setting the timeout parameter much higher in TabPy, it may be timing out.

I did that - pushed it to 30min but still hangs and doesn’t time out after the 30min which makes me think this isn’t it

tb582 commented 2 years ago

Is Prep crashing or just hanging?

Just hung with the error - I can still do things in prep it’s just not getting a good response from tabpy

nmannheimer commented 2 years ago

Can you try filtering the dataset to something small like 5k rows and see if that works?

tb582 commented 2 years ago

Can you try filtering the dataset to something small like 5k rows and see if that works?

good idea - I tried 5K, 500, and 5 - all resulted in the same error

System error: Unknown Error when setting up request to TabPy. null

yet I have no issue when calling the same function tabpy calls outside of prep

nmannheimer commented 2 years ago

Can you confirm even a basic call to TabPy works from your Prep setup, like running a function to add 2 columns together?

tb582 commented 2 years ago

Can you confirm even a basic call to TabPy works from your Prep setup, like running a function to add 2 columns together?

yes as I have another script in the same flow that works fine.

nmannheimer commented 2 years ago

This seems like there may be an error running with this code specifically then, which is hard to comment on.