ipython-contrib / jupyter_contrib_nbextensions

A collection of various notebook extensions for Jupyter
http://jupyter-contrib-nbextensions.readthedocs.io/en/latest
Other
5.2k stars 806 forks source link

Fix bug on `nbconvert`: No module named 'notebook.services' #1663

Open jalsti opened 2 weeks ago

jalsti commented 2 weeks ago

when running jupyter nbconvert --execute --allow-errors --to pdf myfile.ipynb an error occured:
""" File "/home/user/.local/lib/python3.11/site-packages/jupyter_contrib_nbextensions/nbconvert_support/init.py", line 5, in from .collapsible_headings import ExporterCollapsibleHeadings File "/home/user/.local/lib/python3.11/site-packages/jupyter_contrib_nbextensions/nbconvert_support/collapsible_headings.py", line 6, in from notebook.services.config import ConfigManager ModuleNotFoundError: No module named 'notebook.services' """

This change updates collapsible_headings.py to use the correct import from jupyter_server.services.config import ConfigManager

MichaelWoodc commented 2 weeks ago

Just encountered this issue right now! Not sure what changed overnight. Thanks for jumping on it!