Nest asyncio breaks JupyterLab (tornado)
SylvainCorlay opened this issue · 2 comments
SylvainCorlay commented
[E 09:55:15.053 LabApp] Uncaught exception GET /nbconvert/webpdf/basics.ipynb?download=true (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/nbconvert/webpdf/basics.ipynb?download=true', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "/home/sylvain/miniconda3/lib/python3.7/site-packages/tornado/web.py", line 1703, in _execute
result = await result
File "/home/sylvain/miniconda3/lib/python3.7/site-packages/tornado/gen.py", line 748, in run
yielded = self.gen.send(value)
File "/home/sylvain/miniconda3/lib/python3.7/site-packages/notebook/nbconvert/handlers.py", line 152, in get
self.finish(output)
File "/home/sylvain/miniconda3/lib/python3.7/site-packages/tornado/web.py", line 1126, in finish
self.write(chunk)
File "/home/sylvain/miniconda3/lib/python3.7/site-packages/tornado/web.py", line 834, in write
raise TypeError(message)
TypeError: write() only accepts bytes, unicode, and dict objects
erdewit commented
It looks like you're exporting a notebook as PDF. This does work with v1.4.1.
SylvainCorlay commented
It looks like you're exporting a notebook as PDF. This does work with v1.4.1.
Yes, I am exporting a notebook using a new pdf exporter called webpdf
(I am a maintainer of nbconvert).
I made a tag of nbconvert where I run the event loop in a thread for that purpose.
Thanks for tagging a release!