Skip to content

Classic Jupyter notebook fails in release 2023-02 #1260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Olaf987 opened this issue Sep 25, 2023 · 4 comments
Closed

Classic Jupyter notebook fails in release 2023-02 #1260

Olaf987 opened this issue Sep 25, 2023 · 4 comments

Comments

@Olaf987
Copy link

Olaf987 commented Sep 25, 2023

The Jupyter notebook application does not start in release release 2023-02 of WinPython64-3.11.4.0. The Jupyter lab application runs fine though.

Creating or opening a notebook gives a 500: Internal server error.

[I 2023-09-25 15:09:10.845 ServerApp] Creating new notebook in
[E 2023-09-25 15:09:12.222 ServerApp] Uncaught exception GET /notebooks/Untitled.ipynb?kernel_name=python3 (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/notebooks/Untitled.ipynb?kernel_name=python3', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\tornado\web.py", line 1786, in execute
result = await result
^^^^^^^^^^^^
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\tornado\gen.py", line 786, in run
yielded = self.gen.send(value)
^^^^^^^^^^^^^^^^^^^^
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\nbclassic\notebook\handlers.py", line 101, in get
self.write(self.render_template('notebook.html',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\jupyter_server\base\handlers.py", line 633, in render_template
return template.render(**ns)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\jinja2\environment.py", line 1301, in render
self.environment.handle_exception()
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\jinja2\environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\nbclassic\templates\notebook.html", line 1, in top-level template code
{% extends "page.html" %}
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\nbclassic\templates\page.html", line 190, in top-level template code
{% block header %}
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\nbclassic\templates\notebook.html", line 115, in block 'header'
{% for exporter in get_frontend_exporters() %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\nbclassic\notebook\handlers.py", line 46, in get_frontend_exporters
for name in get_export_names():
^^^^^^^^^^^^^^^^^^
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\nbconvert\exporters\base.py", line 150, in get_export_names
e = get_exporter(exporter_name)(config=config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\nbconvert\exporters\base.py", line 109, in get_exporter
exporter = [e for e in exporters if e.name == name or e.name == name.lower()][0].load()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\importlib_metadata_init
.py", line 207, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\nbconvert_reportlab_init
.py", line 6, in
from .exporter import ReportlabExporter
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\nbconvert_reportlab\exporter.py", line 20, in
from .rlmarkdown import md_to_flowables
File "C:\Programs\WPy64-31140\python-3.11.4.amd64\Lib\site-packages\nbconvert_reportlab\rlmarkdown.py", line 16, in
class InlineRenderer(mistune.Renderer):
^^^^^^^^^^^^^^^^
AttributeError: module 'mistune' has no attribute 'Renderer'
[E 2023-09-25 15:09:12.233 NotebookApp] {
"Host": "localhost:8888",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,/;q=0.8",
"Referer": "http://localhost:8888/tree",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0"
}
[E 2023-09-25 15:09:12.233 NotebookApp] 500 GET /notebooks/Untitled.ipynb?kernel_name=python3 (513089e1de1c45e28cd165a5d02ed540@127.0.0.1) 1325.55ms referer=http://localhost:8888/tree

As I have the Jupyter lab as alternative, this pose no problem for me. Nevertheless it is still an error.

@stonebig
Copy link
Contributor

stonebig commented Sep 25, 2023

try downgrading to mistune-0.8.4 if you want, but then nbconvert may not be happy.
I dropped nbClassic , and Jupyterlab-3 after this, prefering nightmare of new to nightmare of technical debt

@Olaf987
Copy link
Author

Olaf987 commented Sep 26, 2023

In my opinion, this will sort it self out after a while once Jupyter gets its act together. I would just recommend using JupyterLab instead. But then you should hide "Jupyter Notebook.exe" and scripts\winipython_notebook.bat and scripts\winjupyter_nbclassic.bat

@firai
Copy link
Contributor

firai commented Sep 30, 2023

I thought the Notebook shortcut points to NB 7 these days rather than nbclassic?

@Olaf987
Copy link
Author

Olaf987 commented Oct 4, 2023

Things work again in winpython 2023-03. I suggest we close this issue. In 2023-03 the jupyter notebook versin is reported as 7.0.4

@stonebig stonebig closed this as completed May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants