bitcoin-tx-tutorial
bitcoin-tx-tutorial copied to clipboard
ModuleNotFoundError: No module named 'jupyter_server.contents'
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'
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
pip install notebook -U
👍 this worked thanks