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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jalsti
Copy link

@jalsti jalsti commented Jul 4, 2024

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

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 <module>
    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 <module>
    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
Copy link

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

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 this pull request may close these issues.

None yet

2 participants