jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.8k stars 5.01k forks source link

`TypeError: object generator can't be used in 'await' expression` when rendering images in Jupyter notebook #4870

Open Limmen opened 5 years ago

Limmen commented 5 years ago

Since version 6.0.0 I get this error when trying to render images in my jupyter notebooks (downgrading to 5.7.8 fixes the problem for now): [E 08:44:50.483 NotebookApp] Uncaught exception GET /hopsworks-api/jupyter/53903/files/images/overview.png (127.0.0.1) HTTPServerRequest(protocol='http', host='localhost:53903', method='GET', uri='/hopsworks-api/jupyter/53903/files/images/overview.\ png', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "/srv/hops/anaconda/anaconda/envs/python36/lib/python3.6/site-packages/tornado/web.py", line 1699, in _execute result = await result TypeError: object generator can't be used in 'await' expression [D 08:44:50.483 NotebookApp] Using contents: services/contents [D 08:44:50.484 NotebookApp] Using contents: services/contents [E 08:44:50.486 NotebookApp] { "Host": "localhost:53903", "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0", "Accept": "image/webp,*/*", "Accept-Language": "sv-SE,sv;q=0.8,en-US;q=0.5,en;q=0.3", "Accept-Encoding": "gzip, deflate, br", "Referer": "https://bbc1.sics.se:36115/hopsworks-api/jupyter/53903/notebooks/FeaturestoreTourPython.ipynb", "Connection": "keep-alive", "Cookie": "username-localhost-53903=\"2|1:0|10:1564039325|24:username-localhost-53903|44:MDg3MTg1N2Q0NjMwNDY5N2EwZjg2NjY2YmE5ZG\ E0MjA=|ec77e30f7229a903c750bb4eb403e85bd9338516c9621947173ffdb02362ce6a\"; _xsrf=2|a89bc132|23462c65bb46547dd8eb6ca6a5a859f1|15627519\ 82; JSESSIONID=801ca3bb7fcfe3b09dca301045ab; SESSION=801d94011d02051e0b1b5c675f55; JSESSIONIDSSO=09459074CA9836D4E07ACB21A8A1E400", "Destination": "http://localhost:53903/hopsworks-api/jupyter/53903/files/images/overview.png", "X-Forwarded-For": "bbc1.sics.se", "X-Forwarded-Proto": "http", "X-Forwarded-Host": "bbc1.sics.se:36115" }

Anyone that got the same issue and has some idea about the problem?

LucaSoato commented 5 years ago

Same here, I had this problem trying to download notebooks inside a JupyterHub server, is version 6.0.0 compatible with JupyterHub 1.0.0? This happens both with Jupyter notebook and JupyterLab

LucaSoato commented 5 years ago

The problem was solved by disabling pgcontents HybridContentsManager, probably it's an issue on that side.

manics commented 4 years ago

This was fixed in 6.0.2: https://github.com/jupyter/notebook/pull/4891