Skip to content

Command run jupyter notebook stopped hosting locally  #7162

Closed
@brunolnetto

Description

@brunolnetto

Description

I use my personal linux machine to run notebooks. Today, I tried to run regular "jupyter notebook" command, but got error log below. I already purged the jupyter content from my machine and also tried installing inside a virtual environment, running command without success. There is something other I am not trying.

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/notebook/traittypes.py", line 235, in _resolve_classes
    klass = self._resolve_string(klass)
  File "/home/brunolnetto/.local/lib/python3.8/site-packages/traitlets/traitlets.py", line 2018, in _resolve_string
    return import_item(string)
  File "/home/brunolnetto/.local/lib/python3.8/site-packages/traitlets/utils/importstring.py", line 31, 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 "/home/brunolnetto/.local/bin/jupyter-notebook", line 8, in <module>
    sys.exit(main())
  File "/home/brunolnetto/.local/lib/python3.8/site-packages/jupyter_core/application.py", line 280, in launch_instance
    super().launch_instance(argv=argv, **kwargs)
  File "/home/brunolnetto/.local/lib/python3.8/site-packages/traitlets/config/application.py", line 1051, in launch_instance
    app = cls.instance(**kwargs)
  File "/home/brunolnetto/.local/lib/python3.8/site-packages/traitlets/config/configurable.py", line 583, in instance
    inst = cls(*args, **kwargs)
  File "/home/brunolnetto/.local/lib/python3.8/site-packages/traitlets/traitlets.py", line 1294, in __new__
    inst.setup_instance(*args, **kwargs)
  File "/home/brunolnetto/.local/lib/python3.8/site-packages/traitlets/traitlets.py", line 1337, in setup_instance
    super(HasTraits, self).setup_instance(*args, **kwargs)
  File "/home/brunolnetto/.local/lib/python3.8/site-packages/traitlets/traitlets.py", line 1313, in setup_instance
    init(self)
  File "/usr/local/lib/python3.8/dist-packages/notebook/traittypes.py", line 226, in instance_init
    self._resolve_classes()
  File "/usr/local/lib/python3.8/dist-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'

Reproduce

  1. Run pip install jupyter && jupyter notebook

Expected behavior

Server startup and open browser tab with jupyter UI.

Context

  • Operating System and version: Linux Ubuntu 21.04
  • Jupyter Notebook version:
IPython          : 8.12.3
ipykernel        : 6.27.0
ipywidgets       : 7.7.0
jupyter_client   : 8.6.0
jupyter_core     : 5.5.0
jupyter_server   : not installed
jupyterlab       : not installed
nbclient         : 0.6.4
nbconvert        : 6.5.0
nbformat         : 5.4.0
notebook         : 6.4.11
qtconsole        : 5.5.1
traitlets        : 5.13.0
Troubleshoot Output
$PATH:
	/home/brunolnetto/.local/bin/jupyter
	/home/brunolnetto/.meteor
	/home/brunolnetto/.nvm/versions/node/v19.6.0/bin
	/home/brunolnetto/.local/bin
	/usr/local/sbin
	/usr/local/bin
	/usr/sbin
	/usr/bin
	/sbin
	/bin
	/usr/games
	/usr/local/games
	/snap/bin
	/usr/local/bin

sys.path:
/home/brunolnetto/.local/bin
/usr/lib/python38.zip
/usr/lib/python3.8
/usr/lib/python3.8/lib-dynload
/home/brunolnetto/.local/lib/python3.8/site-packages
/usr/local/lib/python3.8/dist-packages
/usr/lib/python3/dist-packages

sys.executable:
/usr/bin/python3

sys.version:
3.8.10 (default, May 26 2023, 14:05:08)
[GCC 9.4.0]

platform.platform():
Linux-5.15.0-89-generic-x86_64-with-glibc2.29

which -a jupyter:
/home/brunolnetto/.local/bin/jupyter

pip list:
Package Version
----------------------------- --------------------
about-time 4.2.1
absl-py 1.4.0
acme 1.27.0
alabaster 0.7.12
alembic 1.8.0
alive-progress 3.1.4
amqp 2.5.2
annotated-types 0.5.0
ansi2txt 0.2.0
anyio 3.7.1
anyjson 0.3.3
anywidget 0.4.3
appdirs 1.4.4
apturl 0.5.2
argh 0.26.2
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
args 0.1.0
arrow 1.2.3
asgiref 3.7.2
astroid 2.3.3
asttokens 2.4.1
asv 0.6.1
asv_runner 0.1.0
async-generator 1.10
attrs 23.1.0
autopep8 2.0.4
awscli 1.18.69
Babel 2.11.0
backcall 0.2.0
backports.zoneinfo 0.2.1
bcrypt 3.2.2
beautifulsoup4 4.11.1
billiard 3.6.1.0
binary 1.0.0
binaryornot 0.4.4
black 22.3.0
bleach 5.0.0
blinker 1.6.2
bokeh 3.1.1
boto3 1.26.153
botocore 1.29.153
branca 0.7.0
Brlapi 0.7.0
build 1.0.3
bump2version 0.5.11
burla 0.4.0
CacheControl 0.13.1
cachetools 5.3.1
celery 4.2.1
certbot 1.27.0
certbot-nginx 1.27.0
certifi 2022.5.18.1
certipy 0.1.3
cffi 1.15.0
cfgv 3.3.1
chardet 4.0.0
charset-normalizer 2.0.12
ci-info 0.3.0
cleo 2.1.0
click 8.1.3
clint 0.5.1
cloudpickle 2.2.1
cmake 3.27.2
colorama 0.4.4
colorlog 6.7.0
comm 0.2.0
command-not-found 0.3
ConfigArgParse 1.5.3
configobj 5.0.8
configparser 6.0.0
contourpy 1.1.1
cookiecutter 2.4.0
coverage 6.1.1
crashtest 0.4.1
cryptography 37.0.2
cssselect 1.1.0
cupshelpers 1.0
cycler 0.12.1
databases 0.8.0
debugpy 1.8.0
decorator 5.1.1
decouple 0.0.7
defer 1.0.6
defusedxml 0.7.1
dill 0.3.7
distlib 0.3.7
distro 1.7.0
distro-info 1.0
Django 4.2.4
docutils 0.18.1
dulwich 0.21.6
duplicity 0.8.12.0
easyocr 1.7.0
editables 0.5
EditorConfig 0.12.2
entrypoints 0.3
ephem 3.7.7.1
etelemetry 0.3.0
eule 1.1.0
exceptiongroup 1.1.1
executing 2.0.1
fastapi 0.103.1
fasteners 0.17.3
fastjsonschema 2.18.1
filelock 3.12.4
fire 0.5.0
fitz 0.0.1.dev2
flake8 3.7.8
Flask 2.3.2
folium 0.15.0
fonttools 4.45.1
fqdn 1.5.1
future 0.18.2
google-api-core 2.11.1
google-auth 2.22.0
google-cloud-bigquery 3.11.4
google-cloud-core 2.3.3
google-cloud-vision 3.4.4
google-crc32c 1.5.0
google-resumable-media 2.5.0
googleapis-common-protos 1.60.0
grapheme 0.6.0
graphviz 0.20.1
greenlet 1.1.2
grpcio 1.57.0
grpcio-status 1.57.0
h11 0.14.0
hatch 1.7.0
hatchling 1.18.0
html5lib 1.1
httpcore 0.18.0
httplib2 0.20.4
httptools 0.1.2
httpx 0.25.0
hyperlink 21.0.0
identify 2.5.8
idna 3.3
imageio 2.31.2
imagesize 1.4.1
importlib-metadata 6.8.0
importlib-resources 6.1.1
iniconfig 1.1.1
installer 0.7.0
ipykernel 6.27.0
ipytest 0.13.2
ipython 8.12.3
ipython-genutils 0.2.0
ipywidgets 7.7.0
isodate 0.6.1
isoduration 20.11.0
isort 4.3.4
itsdangerous 2.1.2
jaraco.classes 3.3.0
jedi 0.19.1
jeepney 0.8.0
Jinja2 3.1.2
jmespath 1.0.1
joblib 1.1.0
josepy 1.13.0
jsbeautifier 1.10.3
json5 0.9.14
jsonpatch 1.32
jsonpointer 2.3
jsonschema 4.20.0
jsonschema-specifications 2023.11.1
jupyter 1.0.0
jupyter_client 8.6.0
jupyter-console 6.6.3
jupyter_core 5.5.0
jupyter-events 0.9.0
jupyter_server 2.10.1
jupyter_server_terminals 0.4.4
jupyterlab_pygments 0.3.0
jupyterlab-widgets 3.0.9
kazam 1.4.5
keyring 24.2.0
kiwisolver 1.4.5
kombu 4.6.7
language-selector 0.1
launchpadlib 1.10.16
lazr.restfulclient 0.14.4
lazr.uri 1.0.6
lazy_loader 0.3
lazy-object-proxy 1.4.3
lit 16.0.6
lockfile 0.12.2
logilab-common 1.4.3
looseversion 1.3.0
louis 3.12.0
luigi 3.3.0
lxml 4.5.0
macaroonbakery 1.3.1
Mako 1.2.0
mamba 0.11.3
Markdown 3.3.7
markdown-it-py 3.0.0
MarkupSafe 2.1.1
matplotlib 3.7.4
matplotlib-inline 0.1.6
mccabe 0.6.1
mdurl 0.1.2
menulibre 2.2.1
mistune 0.8.4
mock 4.0.3
monotonic 1.6
more-itertools 8.13.0
mpmath 1.3.0
mrjob 0.7.4
msgpack 1.0.6
mypy 1.0.0
mypy-extensions 0.4.3
nbclient 0.6.4
nbconvert 6.5.0
nbformat 5.4.0
nest-asyncio 1.5.8
netifaces 0.11.0
networkx 3.1
nibabel 5.1.0
ninja 1.11.1
nipype 1.8.6
nodeenv 1.7.0
nose 1.3.7
notebook 6.4.11
numpy 1.24.1
nvidia-cublas-cu11 11.10.3.66
nvidia-cuda-cupti-cu11 11.7.101
nvidia-cuda-nvrtc-cu11 11.7.99
nvidia-cuda-runtime-cu11 11.7.99
nvidia-cudnn-cu11 8.5.0.96
nvidia-cufft-cu11 10.9.0.58
nvidia-curand-cu11 10.2.10.91
nvidia-cusolver-cu11 11.4.0.1
nvidia-cusparse-cu11 11.7.4.91
nvidia-nccl-cu11 2.14.3
nvidia-nvtx-cu11 11.7.91
oauthlib 3.2.0
olefile 0.46
opencv-python 4.8.0.76
opencv-python-headless 4.8.0.76
ortools 9.7.2996
overrides 7.3.1
packaging 23.2
pamela 1.0.0
pandas 2.0.3
pandocfilters 1.5.0
paramiko 2.11.0
parsedatetime 2.6
parso 0.8.3
pathlib 1.0.1
pathspec 0.11.2
pathtools 0.1.2
pbr 5.9.0
pdfCropMargins 1.0.5
pep517 0.13.0
pexpect 4.8.0
pickleshare 0.7.5
Pillow 10.1.0
pip 23.3.1
pip-conflict-checker 0.6.0
pip-review 1.1.1
pipx 0.12.3.1
pkginfo 1.9.6
pkgutil_resolve_name 1.3.10
platformdirs 4.0.0
pluggy 1.3.0
poetry 1.7.0
poetry-core 1.8.1
poetry-plugin-export 1.6.0
polars 0.19.3
pre-commit 2.20.0
prometheus-client 0.14.1
prompt-toolkit 3.0.41
proto-plus 1.22.3
protobuf 4.24.0
prov 2.0.0
psutil 5.9.6
psygnal 0.9.1
ptyprocess 0.7.0
pure-eval 0.2.2
py 1.11.0
py4j 0.10.9.7
pyarrow 14.0.1
pyasn1 0.5.0
pyasn1-modules 0.3.0
pybary 0.2.0
pycairo 1.16.2
pyclipper 1.3.0.post4
pycodestyle 2.11.0
pycparser 2.21
pycups 1.9.73
pydantic 2.3.0
pydantic_core 2.6.3
pydot 1.4.2
pyee 9.0.4
pyflakes 2.1.1
Pygments 2.17.2
PyGObject 3.36.0
pyinotify 0.9.6
PyJWT 2.4.0
pylint 2.4.4
pymacaroons 0.13.0
Pympler 1.0.1
PyNaCl 1.5.0
pyOpenSSL 22.0.0
pyparsing 3.1.1
PyPDF2 2.1.0
pyperclip 1.8.2
pypinfo 21.0.0
pypng 0.20220715.0
pyppeteer 1.0.2
pyproject_hooks 1.0.0
PyQt5 5.14.1
pyRFC3339 1.1
pyrsistent 0.18.1
pyspark 3.4.0
pytest 6.2.4
pytest-cov 4.0.0
pytest-testmon 2.0.2
python-apt 2.0.1+ubuntu0.20.4.1
python-bidi 0.4.2
python-daemon 3.0.1
python-dateutil 2.8.2
python-debian 0.1.43
python-decouple 3.8
python-devtools 2
python-dotenv 1.0.0
python-json-logger 2.0.7
python-memcached 1.58
python-slugify 8.0.1
pytz 2023.3.post1
PyWavelets 1.4.1
pyxdg 0.26
pyxnat 1.6
PyYAML 5.3.1
pyzmq 25.1.1
qrcode 7.4.2
qtconsole 5.5.1
QtPy 2.4.1
rapidfuzz 3.5.2
rdflib 7.0.0
reactpy 1.0.0
readme-renderer 37.3
referencing 0.31.0
reportlab 3.6.10
requests 2.27.1
requests-toolbelt 0.9.1
requests-unixsocket 0.3.0
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rich 13.5.3
roman 2.0.0
rpds-py 0.13.1
rsa 4.9
ruamel.yaml 0.17.21
ruamel.yaml.clib 0.2.6
ruff 0.1.6
s3transfer 0.6.1
scikit-image 0.21.0
scikit-learn 1.1.1
scipy 1.8.1
scour 0.37
screen-resolution-extra 0.0.0
seaborn 0.12.2
SecretStorage 3.3.2
Send2Trash 1.8.2
setuptools 58.3.0
shapely 2.0.1
shellingham 1.5.3
simplejson 3.16.0
sip 4.19.21
six 1.16.0
sniffio 1.3.0
snowballstemmer 2.2.0
soupsieve 2.3.2.post1
Sphinx 1.8.5
sphinx-rtd-theme 1.2.0
sphinxcontrib-jquery 4.1
sphinxcontrib-serializinghtml 1.1.3
sphinxcontrib-websupport 1.1.0
spycio 0.2.8
SQLAlchemy 1.4.49
sqlparse 0.4.4
ssh-import-id 5.10
stack-data 0.6.3
starlette 0.27.0
strip-ansi 0.1.1
sympy 1.12
systemd-python 234
tabulate 0.9.0
tblib 2.0.0
tenacity 8.2.2
termcolor 2.3.0
terminado 0.15.0
testpath 0.6.0
text-unidecode 1.3
threadpoolctl 3.1.0
tifffile 2023.7.10
tinycss2 1.1.1
tinydb 4.8.0
tinyrecord 0.2.0
toml 0.10.2
tomli 2.0.1
tomli_w 1.0.0
tomlkit 0.12.1
torch 2.0.1
torchvision 0.15.2
tornado 6.3.3
tox 3.14.1
tox-pyenv 1.1.0
tqdm 4.64.0
traitlets 5.13.0
traits 6.3.2
triton 2.0.0
trove-classifiers 2023.9.19
twine 2.0.0
typed-ast 1.4.1
types-psutil 5.9.5.17
types-toml 0.10.8.6
typing_extensions 4.8.0
tzdata 2023.3
ubuntu-advantage-tools 8001
ubuntu-drivers-common 0.0.0
ufw 0.36
unattended-upgrades 0.1
uri-template 1.2.0
urllib3 1.26.9
usb-creator 0.3.7
userpath 1.9.1
uvicorn 0.11.3
uvloop 0.17.0
vine 1.3.0
virtualenv 20.24.5
wadllib 1.3.6
watchdog 0.9.0
wcwidth 0.2.12
webcolors 1.13
webencodings 0.5.1
websocket-client 1.5.2
websockets 10.3
Werkzeug 2.3.4
wheel 0.37.1
widgetsnbextension 3.6.0
wrapt 1.11.2
wsproto 0.15.0
xkit 0.0.0
xyzservices 2023.10.0
yaspin 2.5.0
zipp 3.17.0
zope.component 5.0.1
zope.event 4.5.0
zope.hookable 5.1.0

Command Line Output
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/notebook/traittypes.py", line 235, in _resolve_classes
    klass = self._resolve_string(klass)
  File "/home/brunolnetto/.local/lib/python3.8/site-packages/traitlets/traitlets.py", line 2018, in _resolve_string
    return import_item(string)
  File "/home/brunolnetto/.local/lib/python3.8/site-packages/traitlets/utils/importstring.py", line 31, 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 "/home/brunolnetto/.local/bin/jupyter-notebook", line 8, in
sys.exit(main())
File "/home/brunolnetto/.local/lib/python3.8/site-packages/jupyter_core/application.py", line 280, in launch_instance
super().launch_instance(argv=argv, **kwargs)
File "/home/brunolnetto/.local/lib/python3.8/site-packages/traitlets/config/application.py", line 1051, in launch_instance
app = cls.instance(**kwargs)
File "/home/brunolnetto/.local/lib/python3.8/site-packages/traitlets/config/configurable.py", line 583, in instance
inst = cls(*args, **kwargs)
File "/home/brunolnetto/.local/lib/python3.8/site-packages/traitlets/traitlets.py", line 1294, in new
inst.setup_instance(*args, **kwargs)
File "/home/brunolnetto/.local/lib/python3.8/site-packages/traitlets/traitlets.py", line 1337, in setup_instance
super(HasTraits, self).setup_instance(*args, **kwargs)
File "/home/brunolnetto/.local/lib/python3.8/site-packages/traitlets/traitlets.py", line 1313, in setup_instance
init(self)
File "/usr/local/lib/python3.8/dist-packages/notebook/traittypes.py", line 226, in instance_init
self._resolve_classes()
File "/usr/local/lib/python3.8/dist-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'

Browser Output
Paste the output from your browser Javascript console here, if applicable.

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