Jupytab icon indicating copy to clipboard operation
Jupytab copied to clipboard

tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error

Open cschweipert opened this issue 4 years ago • 5 comments

I get this error when I go to "Explore in Tableau".

cschweipert avatar Feb 15 '22 18:02 cschweipert

Sorry, but I can not help you troubleshooting with so few information

btribonde avatar Feb 16 '22 11:02 btribonde

I installed the jupytab server in a virtual environment, and created the kernel in another virtual environment. I did not use conda. I established the web connection in Tableau. When I click on "Explore in Tableau" I get this error when it's trying to fetch the data from the notebook. I had it working the day prior and now when I go back to it, this is what happens. I love the idea behind the package and was amazed when I was able to work with my dataframes in tableau. When I made changes in Jupyter and wanted to update the tables in Tableau I ran into the below issue. It's not fetching the data.

Starting Jupytab-Server 0.9.11 SSL not enabled Start notebook /Users/christinaschweipert/jupyter/cohort_analysis_tableau/cohort_analysis_2/cohort_analysis_2.ipynb on 127.0.0.1:49239 You have no defined token. Please note your process is not secured ! Please open : http://Christinas-MBP:8123 INFO:/Users/christinaschweipert/jupyter/cohort_analysis_tableau/jupytab-server/lib/python3.9/site-packages/traitlets/traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'kernel_gateway.notebook_http' instead of "'kernel_gateway.notebook_http'" if you require traitlets >=5. INFO: warn( INFO:/Users/christinaschweipert/jupyter/cohort_analysis_tableau/jupytab-server/lib/python3.9/site-packages/traitlets/traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use '127.0.0.1' instead of "'127.0.0.1'" if you require traitlets >=5. INFO: warn( INFO:[KernelGatewayApp] Kernel started: f8a6e0e9-f630-4037-a295-c8607491efc6, name: jupytab-kernel INFO:[KernelGatewayApp] Registering resource: /schema, methods: (['GET']) INFO:[KernelGatewayApp] Registering resource: /_api/spec/swagger.json, methods: (GET) INFO:[KernelGatewayApp] Jupyter Kernel Gateway at http://127.0.0.1:49239 INFO:200 GET / (10.0.0.5) 17.53ms INFO:200 GET /vendor/bootstrap/bootstrap-4.2.1.min.css (10.0.0.5) 4.04ms INFO:200 GET /vendor/jquery/jquery-3.3.1.min.js (10.0.0.5) 5.75ms INFO:200 GET /vendor/popper/popper-1.14.6.min.js (10.0.0.5) 5.75ms INFO:200 GET /vendor/bootstrap/bootstrap-4.2.1.min.js (10.0.0.5) 6.03ms INFO:200 GET /vendor/tableau/tableauwdc-2.3.latest.js (10.0.0.5) 1.84ms INFO:200 GET /notebook.js (10.0.0.5) 2.04ms INFO:200 GET /api?security_token= (10.0.0.5) 1.24ms INFO:200 GET /favicon.ico (10.0.0.5) 1.22ms INFO:200 GET / (10.0.0.5) 1.93ms INFO:200 GET /vendor/bootstrap/bootstrap-4.2.1.min.css (10.0.0.5) 2.32ms INFO:200 GET /vendor/jquery/jquery-3.3.1.min.js (10.0.0.5) 2.56ms INFO:200 GET /vendor/popper/popper-1.14.6.min.js (10.0.0.5) 2.75ms INFO:200 GET /vendor/bootstrap/bootstrap-4.2.1.min.js (10.0.0.5) 1.40ms INFO:200 GET /vendor/tableau/tableauwdc-2.3.latest.js (10.0.0.5) 1.94ms INFO:200 GET /notebook.js (10.0.0.5) 2.59ms INFO:200 GET /api?security_token= (10.0.0.5) 1.18ms INFO:200 GET /favicon.ico (10.0.0.5) 1.38ms INFO:ERROR:tornado.access:500 GET /schema (127.0.0.1) 979.14ms Error raised: Please visit http://127.0.0.1:49239/schema from jupytab-server machine to get more information about notebook execution error ERROR:Uncaught exception GET /kernel/CohortAnalysis/schema?security_token= (10.0.0.5) HTTPServerRequest(protocol='http', host='christinas-mbp:8123', method='GET', uri='/kernel/CohortAnalysis/schema?security_token=', version='HTTP/1.1', remote_ip='10.0.0.5') Traceback (most recent call last): File "/Users/christinaschweipert/jupyter/cohort_analysis_tableau/jupytab-server/lib/python3.9/site-packages/tornado/web.py", line 1704, in _execute result = await result File "/Users/christinaschweipert/jupyter/cohort_analysis_tableau/jupytab-server/lib/python3.9/site-packages/jupytab_server/jupytab_api.py", line 200, in get raise e File "/Users/christinaschweipert/jupyter/cohort_analysis_tableau/jupytab-server/lib/python3.9/site-packages/jupytab_server/jupytab_api.py", line 194, in get response = await AsyncHTTPClient().fetch(request) tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error ERROR:Cannot send error response after headers written INFO:200 GET /kernel/CohortAnalysis/schema?security_token= (10.0.0.5) 994.21ms

cschweipert avatar Feb 16 '22 15:02 cschweipert

Jupytab env (the notebook one) is not very sensible to environment updates as it only depends on Pandas.

Jupytab server however is much more sensitive and I would advise you to keep everything as close as possible to the documentation. It means python=3.7 (and not 3.9) and not using it for anything else than installing and running jupytab-server. If it used to work maybe you add another library in this env that creates conflict ? Best thing to do would be to recreate it (only the jupytab-server env)

btribonde avatar Feb 16 '22 18:02 btribonde

Another trick is to retrieve the data directly from faulting uri. It may contains another useful message.

For you it would be something like:

  • http://Christinas-MBP:8123/kernel/CohortAnalysis/schema
  • http://Christinas-MBP:8123/kernel/CohortAnalysis/data?table_name=<your_exported_table_name>

btribonde avatar Feb 16 '22 18:02 btribonde

Last but not least, this may be linked to https://github.com/CFMTech/Jupytab/issues/49

btribonde avatar Feb 16 '22 18:02 btribonde