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

ModuleNotFoundError: No module named 'jupyter_server.contents' #13

Open
pinheadmz opened this issue Sep 14, 2023 · 2 comments
Open

ModuleNotFoundError: No module named 'jupyter_server.contents' #13

pinheadmz opened this issue Sep 14, 2023 · 2 comments

Comments

@pinheadmz
Copy link

Following guide from README, but unable to run the notebook:

--> uname -a
Darwin   21.6.0 Darwin Kernel Version 21.6.0: Thu Mar  9 20:10:19 PST 2023; root:xnu-8020.240.18.700.8~1/RELEASE_ARM64_T8101 arm64 arm Darwin


--> python --version
Python 3.11.4


--> jupyter notebook
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.11/site-packages/notebook/traittypes.py", line 235, in _resolve_classes
    klass = self._resolve_string(klass)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/traitlets/traitlets.py", line 2009, in _resolve_string
    return import_item(string)
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/traitlets/utils/importstring.py", line 30, 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/homebrew/bin/jupyter-notebook", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/jupyter_core/application.py", line 285, in launch_instance
    return super().launch_instance(argv=argv, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/traitlets/config/application.py", line 1044, in launch_instance
    app = cls.instance(**kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/traitlets/config/configurable.py", line 555, in instance
    inst = cls(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/traitlets/traitlets.py", line 1295, in __new__
    inst.setup_instance(*args, **kwargs)
  File "/opt/homebrew/lib/python3.11/site-packages/traitlets/traitlets.py", line 1338, in setup_instance
    super(HasTraits, self).setup_instance(*args, **kwargs)
  File "/opt/homebrew/lib/python3.11/site-packages/traitlets/traitlets.py", line 1314, in setup_instance
    init(self)
  File "/opt/homebrew/lib/python3.11/site-packages/notebook/traittypes.py", line 226, in instance_init
    self._resolve_classes()
  File "/opt/homebrew/lib/python3.11/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'
@realeinherjar
Copy link

Ignore the hardcoded notebook==6.* and update it:

[I] (.venv) ➜  bitcoin-tx-tutorial git:(main) bat requirements.txt
───────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: requirements.txt
───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ base58==2.*
   2   │ ecdsa~=0.18
   3   │ notebook==6.*
───────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[I] (.venv) ➜  bitcoin-tx-tutorial git:(main) pip install notebook -U

@pinheadmz
Copy link
Author

pip install notebook -U

👍 this worked thanks

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

2 participants