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

Can not start kernel with jupyterlab 4.0.0a31 #1081

Closed
trungleduc opened this issue Nov 21, 2022 · 2 comments · Fixed by #1083
Closed

Can not start kernel with jupyterlab 4.0.0a31 #1081

trungleduc opened this issue Nov 21, 2022 · 2 comments · Fixed by #1083
Labels

Comments

@trungleduc
Copy link

Description

I'm using jupyterlab 4.0.0a31 with jupyter-server 2.0.0rc5, the notebook can not start the kernel with the following error message:

[E 2022-11-21 20:20:18.382 ServerApp] Uncaught exception GET /api/kernels/d355be5f-afdc-4809-acf7-f2a0c62ac0e4/channels?session_id=f7cf6c04-fceb-44b5-93f8-29f7eada37c6 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='127.0.0.1:8888', method='GET', uri='/api/kernels/d355be5f-afdc-4809-acf7-f2a0c62ac0e4/channels?session_id=f7cf6c04-fceb-44b5-93f8-29f7eada37c6', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/home/*****/mambaforge/envs/debug/lib/python3.9/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
      File "/home/*****/mambaforge/envs/debug/lib/python3.9/site-packages/jupyter_server/services/kernels/websocket.py", line 62, in get
        await self.pre_get()
      File "/home/*****/mambaforge/envs/debug/lib/python3.9/site-packages/jupyter_server/services/kernels/websocket.py", line 58, in pre_get
        await self.connection.prepare()
      File "/home/*****/mambaforge/envs/debug/lib/python3.9/site-packages/jupyter_server/services/kernels/connection/channels.py", line 292, in prepare
        await self._register_session()
      File "/home/*****/mambaforge/envs/debug/lib/python3.9/site-packages/jupyter_server/services/kernels/connection/channels.py", line 284, in _register_session
        await stale_handler.close()
    TypeError: object NoneType can't be used in 'await' expression

Reproduce

  1. Create a new environment with jupyterlab==4.0.0a31 and jupyter-server==2.0.0rc5
  2. Open a notebook in JupyterLab

Expected behavior

Context

  • Operating System and version: Ubuntu 22.04
  • Browser and version: Chrome
  • Jupyter Server version: 2.0.0rc5
@trungleduc trungleduc added the bug label Nov 21, 2022
@davidbrochart
Copy link
Contributor

davidbrochart commented Nov 21, 2022

On my end, I get the following errors at JupyterLab startup:

[W 2022-11-21 22:23:31.281 ServerApp] jupyter_lsp | error adding extension (enabled: True): The module 'jupyter_lsp' could not be found (cannot import name 'WebSocketHandler' from 'jupyter_server.base.zmqhandlers' (/home/david/mambaforge/envs/tmp/lib/python3.10/site-packages/jupyter_server/base/zmqhandlers.py)). Are you sure the extension is installed?
    Traceback (most recent call last):
      File "/home/david/mambaforge/envs/tmp/lib/python3.10/site-packages/jupyter_server/extension/manager.py", line 175, in _validate_name
        self._module, self._metadata = get_metadata(name)
      File "/home/david/mambaforge/envs/tmp/lib/python3.10/site-packages/jupyter_server/extension/utils.py", line 55, in get_metadata
        module = importlib.import_module(package_name)
      File "/home/david/mambaforge/envs/tmp/lib/python3.10/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/home/david/mambaforge/envs/tmp/lib/python3.10/site-packages/jupyter_lsp/__init__.py", line 4, in <module>
        from .serverextension import load_jupyter_server_extension
      File "/home/david/mambaforge/envs/tmp/lib/python3.10/site-packages/jupyter_lsp/serverextension.py", line 8, in <module>
        from .handlers import add_handlers
      File "/home/david/mambaforge/envs/tmp/lib/python3.10/site-packages/jupyter_lsp/handlers.py", line 6, in <module>
        from jupyter_server.base.zmqhandlers import WebSocketHandler, WebSocketMixin
    ImportError: cannot import name 'WebSocketHandler' from 'jupyter_server.base.zmqhandlers' (/home/david/mambaforge/envs/tmp/lib/python3.10/site-packages/jupyter_server/base/zmqhandlers.py)

@davidbrochart
Copy link
Contributor

I opened #1083.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants