Issue
I was trying to open a .ipynb file in Jupyter Notebook when I got a "500: Internal Server Error" in my browser.
error message in the terminal:
[C 23:01:41.750 NotebookApp]
To access the notebook, open this file in a browser:
file:///$HOME/AppData/Roaming/jupyter/runtime/nbserver-6072-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=c33d644eeb15c66ec4f8764c7e83023f729f162bbc122f38
[E 23:01:44.821 NotebookApp] Uncaught exception GET /notebooks/test.ipynb (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/notebooks/test.ipynb', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "$HOME\Anaconda3\lib\site-packages\tornado\web.py", line 1697, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "$HOME\Anaconda3\lib\site-packages\tornado\web.py", line 3174, in wrapper
return method(self, *args, **kwargs)
File "$HOME\Anaconda3\lib\site-packages\notebook\notebook\handlers.py", line 59, in get
get_custom_frontend_exporters=get_custom_frontend_exporters
File "$HOME\Anaconda3\lib\site-packages\notebook\base\handlers.py", line 462, in render_template
return template.render(**ns)
File "$HOME\Anaconda3\lib\site-packages\jinja2\asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "$HOME\Anaconda3\lib\site-packages\jinja2\environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "$HOME\Anaconda3\lib\site-packages\jinja2\environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "$HOME\Anaconda3\lib\site-packages\jinja2\_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "$HOME\Anaconda3\lib\site-packages\notebook\templates\notebook.html", line 1, in top-level template code
{% extends "page.html" %}
File "$HOME\Anaconda3\lib\site-packages\notebook\templates\page.html", line 154, in top-level template code
{% block header %}
File "$HOME\Anaconda3\lib\site-packages\notebook\templates\notebook.html", line 120, in block "header"
{% for exporter in get_custom_frontend_exporters() %}
File "$HOME\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 "$HOME\Anaconda3\lib\site-packages\nbconvert\__init__.py", line 7, in <module>
from . import postprocessors
File "$HOME\Anaconda3\lib\site-packages\nbconvert\postprocessors\__init__.py", line 5, in <module>
from .serve import ServePostProcessor
File "$HOME\Anaconda3\lib\site-packages\nbconvert\postprocessors\serve.py", line 19, in <module>
class ProxyHandler(web.RequestHandler):
File "$HOME\Anaconda3\lib\site-packages\nbconvert\postprocessors\serve.py", line 21, in ProxyHandler
@web.asynchronous
AttributeError: module 'tornado.web' has no attribute 'asynchronous'
[E 23:01:44.833 NotebookApp] {
"Host": "localhost:8888",
"Connection": "keep-alive",
"Upgrade-Insecure-Requests": "1",
"Dnt": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"Referer": "http://localhost:8888/tree",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7",
"Cookie": "_xsrf=2|2008cea6|390d6f74fcb21ba19bd6f0383f3c2abd|1552660846; username-localhost-8888=\"2|1:0|10:1552662103|23:username-localhost-8888|44:YjUyZWQzMmVhYzYxNDY5NDk4ZGNkNDFhMzhhZWUyOWY=|048e17c293599d50a07b2f0a1cbcdaadbb04e21f8a3b167947e1caee099b442f\""
}
It seems something went wrong with module 'tornado.web'
, which I totally have no idea about. Could someone tell me what to do to get my Jupyter Notebook work again?
Solution
This seems to have been reported elsewhere: https://github.com/conda-forge/nbconvert-feedstock/issues/27
(Edit: https://github.com/jupyter/notebook/issues/4311)
The cause seems to be some version incompatibility involving nbconvert, pandoc and some others.
Answered By - Christoph Burschka
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.