Skip to content

jupyter-collaboration v3 with jupyterlab v4.5 is flooding the terminal with errors #515

@martinRenou

Description

@martinRenou

Description

I see many

/api/collaboration/room/json:notebook:e0977c30-d773-46f5-b871-77a029000929?sessionId=fdd2b8d1-d820-4f04-a0a7-b2bdde674908', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/tornado/web.py", line 1848, in _execute
        result = await result
                 ^^^^^^^^^^^^
      File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/jupyter_server_ydoc/handlers.py", line 220, in get
        return await super().get(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/tornado/websocket.py", line 277, in get
        await self.ws_connection.accept_connection(self)
      File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/tornado/websocket.py", line 890, in accept_connection
        await self._accept_connection(handler)
      File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/tornado/websocket.py", line 973, in _accept_connection
        await self._receive_frame_loop()
      File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/tornado/websocket.py", line 1130, in _receive_frame_loop
        self.handler.on_ws_connection_close(self.close_code, self.close_reason)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/tornado/websocket.py", line 599, in on_ws_connection_close
        self.on_connection_close()
        ~~~~~~~~~~~~~~~~~~~~~~~~^^
      File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/tornado/websocket.py", line 591, in on_connection_close
        self.on_close()
        ~~~~~~~~~~~~~^^
      File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/jupyter_server_ydoc/handlers.py", line 324, in on_close
        if isinstance(self.room, DocumentRoom) and self.room.clients == [self]:
                      ^^^^^^^^^
    AttributeError: 'YDocWebSocketHandler' object has no attribute 'room'
[E 2025-11-20 10:26:19.642 YDocExtension] Jupyter Websocket Server:
      + Exception Group Traceback (most recent call last):
      |   File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/pycrdt_websocket/websocket_server.py", line 217, in start
      |     async with create_task_group() as self._task_group:
      |                ~~~~~~~~~~~~~~~~~^^
      |   File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/anyio/_backends/_asyncio.py", line 781, in __aexit__
      |     raise BaseExceptionGroup(
      |         "unhandled errors in a TaskGroup", self._exceptions
      |     ) from None
      | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
      +-+---------------- 1 ----------------
        | Exception Group Traceback (most recent call last):
        |   File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/pycrdt_websocket/yroom.py", line 226, in start
        |     async with create_task_group() as self._task_group:
        |                ~~~~~~~~~~~~~~~~~^^
        |   File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/anyio/_backends/_asyncio.py", line 781, in __aexit__
        |     raise BaseExceptionGroup(
        |         "unhandled errors in a TaskGroup", self._exceptions
        |     ) from None
        | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
        +-+---------------- 1 ----------------
          | Traceback (most recent call last):
          |   File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/jupyter_server_ydoc/rooms.py", line 206, in _broadcast_updates
          |     await super()._broadcast_updates()
          |   File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/pycrdt_websocket/yroom.py", line 148, in _broadcast_updates
          |     await self._task_group.start(self.ystore.start)
          |           ^^^^^^^^^^^^^^^^^^^^^^
          | AttributeError: 'NoneType' object has no attribute 'start'
          +------------------------------------
        | 
        | During handling of the above exception, another exception occurred:
        | 
        | Traceback (most recent call last):
        |   File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/pycrdt_websocket/yroom.py", line 239, in start
        |     await self.awareness.stop()
        |   File "/home/martin/micromamba/envs/test/lib/python3.14/site-packages/pycrdt/_awareness.py", line 99, in stop
        |     raise RuntimeError("Awareness not started")
        | RuntimeError: Awareness not started

Reproduce

install jupyter-collaboration 3 with jupyterlab 4.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions