Closed lovettchris closed 5 years ago
My machine that works is using tornado=5.1.1, but now we get tornado=6.0.1, so if I remove that then install this:
conda install jupyter tornado=5.1.1
The 500 error goes away, but now nothing shows up in the web page...
Indeed, tornado 6 broke the notebook, although we released 5.7.6
to support tornado 6 last week.
Thanks for the quick response. I installed 5.7.6 but I still get the 500 server error on AttributeError: module 'tornado.web' has no attribute 'asynchronous' ? 'conda list' is showing me:
jupyter_client 5.2.4 py36_0
jupyter_core 4.4.0 py36_0
notebook 5.7.6 py36_0
tornado 6.0.1 py36he774522_0
is there something else I need to do to get it working?
Hum, that is surprising. Could you please provide the full traceback leading to the exception?
Ok, I will do that after my full re-install of anaconda finishes. I'm wondering if anaconda comes with Jupyter pre-installed and whether those preinstalled bits are causing some trouble somehow...
Ok, reinstall finished and I see this in the conda "root" environment from an Anaconda Prompt:
notebook 5.7.4 py37_0
tornado 5.1.1 py37hfa6e2cd_0
And "jupter notebook" in a folder shows empty page instead of a directory tree, and "jupyter notebook Test.ipynb" also returns empty page, no 500 error. When I do "conda update --all" lots of things get upgraded and I see notebook 5.7.6 and tornado 6.0.1 and I get this stack trace from "jupyter notebook Test.ipynb":
To access the notebook, open this file in a browser:
file:///C:/Users/clovett/AppData/Roaming/jupyter/runtime/nbserver-9908-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=acb1a8dfbba4a9e833d9727b514c32239d1630000f8c59bc
[E 12:55:21.654 NotebookApp] Uncaught exception GET /notebooks/TestFeaturizer.ipynb?token=acb1a8dfbba4a9e833d9727b514c32239d1630000f8c59bc (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/notebooks/TestFeaturizer.ipynb?token=acb1a8dfbba4a9e833d9727b514c32239d1630000f8c59bc', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "C:\Continuum\anaconda3\lib\site-packages\tornado\web.py", line 1697, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "C:\Continuum\anaconda3\lib\site-packages\tornado\web.py", line 3174, in wrapper
return method(self, *args, **kwargs)
File "C:\Continuum\anaconda3\lib\site-packages\notebook\notebook\handlers.py", line 59, in get
get_custom_frontend_exporters=get_custom_frontend_exporters
File "C:\Continuum\anaconda3\lib\site-packages\notebook\base\handlers.py", line 519, in render_template
return template.render(**ns)
File "C:\Continuum\anaconda3\lib\site-packages\jinja2\asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "C:\Continuum\anaconda3\lib\site-packages\jinja2\environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "C:\Continuum\anaconda3\lib\site-packages\jinja2\environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\Continuum\anaconda3\lib\site-packages\jinja2\_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "C:\Continuum\anaconda3\lib\site-packages\notebook\templates\notebook.html", line 1, in top-level template code
{% extends "page.html" %}
File "C:\Continuum\anaconda3\lib\site-packages\notebook\templates\page.html", line 154, in top-level template code
{% block header %}
File "C:\Continuum\anaconda3\lib\site-packages\notebook\templates\notebook.html", line 120, in block "header"
{% for exporter in get_custom_frontend_exporters() %}
File "C:\Continuum\anaconda3\lib\site-packages\notebook\notebook\handlers.py", line 19, in get_custom_frontend_exporters
from nbconvert.exporters.base import get_export_names, get_exporter
File "C:\Continuum\anaconda3\lib\site-packages\nbconvert\__init__.py", line 7, in <module>
from . import postprocessors
File "C:\Continuum\anaconda3\lib\site-packages\nbconvert\postprocessors\__init__.py", line 5, in <module>
from .serve import ServePostProcessor
File "C:\Continuum\anaconda3\lib\site-packages\nbconvert\postprocessors\serve.py", line 19, in <module>
class ProxyHandler(web.RequestHandler):
File "C:\Continuum\anaconda3\lib\site-packages\nbconvert\postprocessors\serve.py", line 21, in ProxyHandler
@web.asynchronous
AttributeError: module 'tornado.web' has no attribute 'asynchronous'
[E 12:55:21.670 NotebookApp] {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language": "en-US",
"Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763",
"Accept-Encoding": "gzip, deflate, peerdist",
"Host": "localhost:8888",
"Connection": "Keep-Alive",
"Cookie": "_xsrf=2|366fe98a|d6d1db51840b345e67badcec2f49b292|1551815766; username-localhost-8889=\"2|1:0|10:1552501165|23:username-localhost-8889|44:OWE5MmE0MDQ4NDcwNGFmOWJiMDljN2YyNGYyMzY0N2I=|6caf233b28316c011dfce52e03f357eafda55df38347eb3fec04bb913064ca0c\"; username-localhost-8888=\"2|1:0|10:1552506273|23:username-localhost-8888|44:OTJiZWVlYjYxODBjNGYxNGE5MDRmMWJkYmM5NmRiZjE=|61806b55d3b305a2b35f71f845e0dcebd15f8e6ccbc2af29b8fd15fb54687b32\"",
"X-P2p-Peerdist": "Version=1.1",
"X-P2p-Peerdistex": "MinContentInformation=1.0, MaxContentInformation=2.0"
}
[E 12:55:21.670 NotebookApp] 500 GET /notebooks/TestFeaturizer.ipynb?token=acb1a8dfbba4a9e833d9727b514c32239d1630000f8c59bc (::1) 162.72ms referer=None
I see a couple changes to nbconvert serve.py that I don't have, even though I upgraded nbconvert to the latest. These fix the 500 error, but still nothing shows up in the web page. When I add --log-level=DEBUG I see a bunch of successful GET requests, so the page does contain a skeleton HTML+CSS, but no content, here's the screen shot:
Could this be is related to https://github.com/jupyter/notebook/issues/4469? It helped me to solve a blank screen when running jupyter lab #545.
The PR on https://github.com/jupyter/notebook/pull/4468 solves the issue.
You look for the file notebookapp.py
and add the new line.
Yes, the mimetype fix works for me, thanks for the link! It is a little disconcerting that this bug got out there in the wild and didn't get caught by any automated testing... this wasted a lot of my time...
Installed brand new anaconda, created new Python 3.6 environment, installed Jupyter notebook, and when I try and open a notebook I get this error: