Skip to content

ModuleNotFoundError: No module named 'jupyter_server.contents'Β #7048

@Charles-Gagnon

Description

@Charles-Gagnon

Version: 6.5.5

I've recently started seeing this error when starting up a Notebook app with package version 6.5.5

import notebook.notebookapp
notebook.notebookapp.main()
File "C:\Users\chgagnon\AppData\Roaming\Python\Python38\site-packages\notebook\traittypes.py", line 235, in _resolve_classes
    klass = self._resolve_string(klass)
  File "C:\Users\chgagnon\AppData\Roaming\Python\Python38\site-packages\traitlets\traitlets.py", line 2009, in _resolve_string
    return import_item(string)
  File "C:\Users\chgagnon\AppData\Roaming\Python\Python38\site-packages\traitlets\utils\importstring.py", line 30, in import_item
    module = __import__(package, fromlist=[obj])
ModuleNotFoundError: No module named 'jupyter_server.contents'

It seems to be caused by #5957. In it there's two similar lines in different files

https://github.com/jupyter/notebook/pull/5957/files#diff-805382c95cfca475b5339bcb7ccd1ee13e9326a9d15adf3a6419d32cb38024d5R1394

This has the type specified as jupyter_server.contents.services.managers.ContentsManager (which doesn't seem to be a valid path)

while in https://github.com/jupyter/notebook/pull/5957/files#diff-ba803f92fc3fea5ab9ef22c8064d587d629353f5c9beaa33a809d70dad8cea80R34

it's specified as jupyter_server.services.contents.manager.ContentsManager

Not sure if I'm missing something, or if this was just a typo but I confirmed that if I go in and manually change the "wrong" name in $(Python)\site-packages\notebook\notebookapp.py to the other name then it seems to start up and everything is fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions