Opened 9 months ago

Closed 9 months ago

#69298 closed defect (duplicate)

py-jupyter: ModuleNotFoundError: No module named 'jupyter_server.contents'

Reported by: DanyPPage Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version: 2.9.1
Keywords: ventura Cc: essandess (Steve Smith)
Port: py-jupyter

Description

I have a 2007 iMac and just updates to Ventura 13.6.4, updated Xcode and cmdtools to 13.2 and resintalled Macports from scratch: jupyter fails to start. I uninstalled Xcode and cmdtools and installed Xcode 14.3.1 and cmdtools, completely uninstalled Macports: makes no difference, jupyter fails to start. Here are the errores it prints out:

dany@Ulysses: jupyter notebook
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/notebook/traittypes.py", line 235, in _resolve_classes
    klass = self._resolve_string(klass)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/traitlets/traitlets.py", line 2015, in _resolve_string
    return import_item(string)
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/traitlets/utils/importstring.py", line 33, in import_item
    module = __import__(package, fromlist=[obj])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'jupyter_server.contents'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin/jupyter-notebook", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jupyter_core/application.py", line 277, in launch_instance
    return super().launch_instance(argv=argv, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/traitlets/config/application.py", line 1073, in launch_instance
    app = cls.instance(**kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/traitlets/config/configurable.py", line 583, in instance
    inst = cls(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/traitlets/traitlets.py", line 1292, in __new__
    inst.setup_instance(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/traitlets/traitlets.py", line 1335, in setup_instance
    super(HasTraits, self).setup_instance(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/traitlets/traitlets.py", line 1311, in setup_instance
    init(self)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/notebook/traittypes.py", line 226, in instance_init
    self._resolve_classes()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/notebook/traittypes.py", line 238, in _resolve_classes
    warn(f"{klass} is not importable. Is it installed?", ImportWarning)
TypeError: warn() missing 1 required keyword-only argument: 'stacklevel'
dany@Ulysses:

Exactly same problem with python 3.9 and 3.10

Change History (3)

comment:1 Changed 9 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: ventura added; jupyter removed
Owner: set to stromnov
Port: py-jupyter added
Status: newassigned
Summary: jupyter fail to start on Ventura 13.6.4 with Macports 2.9.1py-jupyter: ModuleNotFoundError: No module named 'jupyter_server.contents'
Version: 2.9.1

comment:2 Changed 9 months ago by stromnov (Andrey Stromnov)

Possible duplicate of #69244.

comment:3 Changed 9 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: essandess added
Resolution: duplicate
Status: assignedclosed
Note: See TracTickets for help on using tickets.