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

not working if jupyter_contrib_nbextensions are installed #2189

Open
hoba87 opened this issue Nov 5, 2024 · 0 comments
Open

not working if jupyter_contrib_nbextensions are installed #2189

hoba87 opened this issue Nov 5, 2024 · 0 comments

Comments

@hoba87
Copy link

hoba87 commented Nov 5, 2024

I tried to convert a Jupyter notebook to python script with jupyter nbconvert --to python ...

This gave me an error if outdated? jupyter_contrib_nbextension is installed:

Traceback (most recent call last):
  File "/opt/python/python-3.10.10/bin/jupyter-nbconvert", line 5, in <module>
    from nbconvert.nbconvertapp import main
  File "/opt/python/python-3.10.10/lib/python3.10/site-packages/nbconvert/nbconvertapp.py", line 193, in <module>
    class NbConvertApp(JupyterApp):
  File "/opt/python/python-3.10.10/lib/python3.10/site-packages/nbconvert/nbconvertapp.py", line 252, in NbConvertApp
    Options include {get_export_names()}.
  File "/opt/python/python-3.10.10/lib/python3.10/site-packages/nbconvert/exporters/base.py", line 145, in get_export_names
    e = get_exporter(exporter_name)(config=config)
  File "/opt/python/python-3.10.10/lib/python3.10/site-packages/nbconvert/exporters/base.py", line 106, in get_exporter
    exporter = items[0].load()
  File "/opt/python/python-3.10.10/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/opt/python/python-3.10.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/opt/python/python-3.10.10/lib/python3.10/site-packages/jupyter_contrib_nbextensions/nbconvert_support/__init__.py", line 5, in <module>
    from .collapsible_headings import ExporterCollapsibleHeadings
  File "/opt/python/python-3.10.10/lib/python3.10/site-packages/jupyter_contrib_nbextensions/nbconvert_support/collapsible_headings.py", line 6, in <module>
    from notebook.services.config import ConfigManager
ModuleNotFoundError: No module named 'notebook.services'

However, when I uninstall it, it works.
So probably, the priority to use it should be downgraded or completely removed.

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

1 participant