Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1001229: python3-nbconvert: 500 error when opening a notebook

0 views
Skip to first unread message

Günter Frenz

unread,
Dec 6, 2021, 1:10:04 PM12/6/21
to
Package: python3-nbconvert
Version: 6.1.0-1
Severity: normal

Dear Maintainer,

today I wanted to work again with my jupyter notebooks but when I try to open a notebook in the browser, I get a 500 internal server error and the log in the console where I started jupyter-notebook shows the following messages:

[guefz@corinnis:~/data/mineral] $ jupyter-notebook --no-browser --notebook-dir python-test/
[I 18:00:53.844 NotebookApp] Serving notebooks from local directory: /home/guefz/data/mineral/python-test
[I 18:00:53.844 NotebookApp] Jupyter Notebook 6.4.5 is running at:
[I 18:00:53.844 NotebookApp] http://localhost:8888/?token=01856103749006da3a0beaa7d83256462324e12ef589fa11
[I 18:00:53.844 NotebookApp] or http://127.0.0.1:8888/?token=01856103749006da3a0beaa7d83256462324e12ef589fa11
[I 18:00:53.844 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 18:00:53.847 NotebookApp]

To access the notebook, open this file in a browser:
file:///home/guefz/.local/share/jupyter/runtime/nbserver-48274-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=01856103749006da3a0beaa7d83256462324e12ef589fa11
or http://127.0.0.1:8888/?token=01856103749006da3a0beaa7d83256462324e12ef589fa11
[I 18:01:14.453 NotebookApp] 302 GET /?token=01856103749006da3a0beaa7d83256462324e12ef589fa11 (127.0.0.1) 0.710000ms
[E 18:01:17.588 NotebookApp] Uncaught exception GET /notebooks/test-pyqtgraph2.ipynb (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/notebooks/test-pyqtgraph2.ipynb', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/tornado/web.py", line 1704, in _execute
result = await result
File "/usr/lib/python3/dist-packages/tornado/gen.py", line 775, in run
yielded = self.gen.send(value)
File "/usr/lib/python3/dist-packages/notebook/notebook/handlers.py", line 95, in get
self.write(self.render_template('notebook.html',
File "/usr/lib/python3/dist-packages/notebook/base/handlers.py", line 516, in render_template
return template.render(**ns)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1304, in render
self.environment.handle_exception()
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 925, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/usr/lib/python3/dist-packages/notebook/templates/notebook.html", line 1, in top-level template code
{% extends "page.html" %}
File "/usr/lib/python3/dist-packages/notebook/templates/page.html", line 153, in top-level template code
{% block header %}
File "/usr/lib/python3/dist-packages/notebook/templates/notebook.html", line 115, in block 'header'
{% for exporter in get_frontend_exporters() %}
File "/usr/lib/python3/dist-packages/notebook/notebook/handlers.py", line 23, in get_frontend_exporters
from nbconvert.exporters.base import get_export_names, get_exporter
File "/usr/lib/python3/dist-packages/nbconvert/__init__.py", line 4, in <module>
from .exporters import *
File "/usr/lib/python3/dist-packages/nbconvert/exporters/__init__.py", line 3, in <module>
from .html import HTMLExporter
File "/usr/lib/python3/dist-packages/nbconvert/exporters/html.py", line 14, in <module>
from nbconvert.filters.highlight import Highlight2HTML
File "/usr/lib/python3/dist-packages/nbconvert/filters/__init__.py", line 6, in <module>
from .markdown import *
File "/usr/lib/python3/dist-packages/nbconvert/filters/markdown.py", line 13, in <module>
from .markdown_mistune import markdown2html_mistune
File "/usr/lib/python3/dist-packages/nbconvert/filters/markdown_mistune.py", line 31, in <module>
class MathBlockGrammar(mistune.BlockGrammar):
AttributeError: module 'mistune' has no attribute 'BlockGrammar'
[E 18:01:17.594 NotebookApp] {
"Host": "localhost:8888",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Accept-Language": "de,en-US;q=0.7,en;q=0.3",
"Accept-Encoding": "gzip, deflate",
"Referer": "http://localhost:8888/tree",
"Dnt": "1",
"Connection": "keep-alive",
"Cookie": "username-localhost-8888=\"2|1:0|10:1638810074|23:username-localhost-8888|44:MzcyMTZhNWZlMDk0NGI0ZjhmZjg3ZmIyODQ3YTYxY2I=|7d1e98fc5a0ea3e90e787261d33c200d2e096fc98e98a9185e6380c563b6d276\"; _xsrf=2|a5a9d73d|b4645908e0d526989c0ee2051ac0574f|1638810074",
"Upgrade-Insecure-Requests": "1",
"Sec-Fetch-Dest": "document",
"Sec-Fetch-Mode": "navigate",
"Sec-Fetch-Site": "same-origin",
"Sec-Fetch-User": "?1"
}
[E 18:01:17.594 NotebookApp] 500 GET /notebooks/test-pyqtgraph2.ipynb (127.0.0.1) 72.870000ms referer=http://localhost:8888/tree

Regards

Günter

-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.15.0-2-amd64 (SMP w/8 CPU threads)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de:en_US
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-nbconvert depends on:
ii python3 3.9.8-1
ii python3-bleach 4.1.0-1
ii python3-defusedxml 0.7.1-1
ii python3-entrypoints 0.3-9
ii python3-jinja2 3.0.1-2
ii python3-jupyter-core 4.9.1-1
ii python3-jupyterlab-pygments 0.1.2-7
ii python3-mistune 2.0.0-1
ii python3-nbclient 0.5.6-2
ii python3-nbformat 5.1.3-1
ii python3-pandocfilters 1.5.0-1
ii python3-pygments 2.7.1+dfsg-2.1
ii python3-testpath 0.5.0+dfsg-1
ii python3-traitlets 5.1.1-1

Versions of packages python3-nbconvert recommends:
pn pandoc <none>
ii python3-jupyter-client 7.1.0-1

Versions of packages python3-nbconvert suggests:
pn python-nbconvert-doc <none>
ii texlive-fonts-recommended 2021.20211127-1
ii texlive-plain-generic 2021.20211127-1
ii texlive-xetex 2021.20211127-1

-- no debconf information

Günter Frenz

unread,
Dec 8, 2021, 5:40:04 PM12/8/21
to
Hi,

I think this bug should be merged with #1001283
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001283

I can confirm that a downgrade of python3-mistune to version 0.8.5-5
solves the problem for now.

Regards Günter

--
-------------------------------------------------------
Günter Frenz
Börschgasse 16a, D-51143 Köln
(h) gu...@guefz.de, gu...@freenet.de
(w) g.f...@gso.schule.koeln
-------------------------------------------------------


0 new messages