Skip to content
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

Error with nbclassic==0.4.0, JupyterLab<4 and notebook<7 #121

Closed
brichet opened this issue Jul 5, 2022 · 1 comment · Fixed by #122
Closed

Error with nbclassic==0.4.0, JupyterLab<4 and notebook<7 #121

brichet opened this issue Jul 5, 2022 · 1 comment · Fixed by #122

Comments

@brichet
Copy link

brichet commented Jul 5, 2022

This check :

from notebook.base.handlers import IPythonHandler as NotebookIPythonHandler
assert NotebookIPythonHandler.__name__ == "JupyterHandler"
seems to work only if Notebook is not installed or in a version >= 7.

Running :

pip install "jupyterlab<4"
pip install "notebook<7"
jupyter server extension list

raises :

File "/home/brichet/miniconda3/envs/nbclassic-test/lib/python3.10/site-packages/nbclassic/__init__.py", line 46, in <module>
    assert NotebookIPythonHandler.__name__ == "JupyterHandler"
AssertionError

which is logic because the following command works :

try:
from notebook._version import __version__ as notebook_version

Maybe a test on the notebook version is missing ?

If this is the desired behavior this issue should be opened in JupyterLab 3.4.x to pin the nbclassic version <0.4.0.

@echarles
Copy link
Member

echarles commented Jul 5, 2022

Thx for reporting. We have been discussing that in #120 (comment)

I have opened a fix on #122

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

Successfully merging a pull request may close this issue.

2 participants