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

Out of band file deletion results in watch file error #417

Open
fcollonval opened this issue Dec 13, 2024 · 0 comments
Open

Out of band file deletion results in watch file error #417

fcollonval opened this issue Dec 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@fcollonval
Copy link
Member

Description

While running a jupyter-server, in which a document is created and modified through a room. If the document is deleted out of band, the watcher keeps throwing errors. Here is an example of the error encountered:

[E 2024-12-13 14:28:16.812 YDocExtension] Error watching file: test-c3d69e549bba475b876203b758f9c616.ipynb
    HTTPError()
    Traceback (most recent call last):
      File "/home/fcollonval/miniconda3/envs/kernel-client/lib/python3.12/site-packages/jupyter_server_ydoc/loaders.py", line 207, in _watch_file
        await self.maybe_notify()
      File "/home/fcollonval/miniconda3/envs/kernel-client/lib/python3.12/site-packages/jupyter_server_ydoc/loaders.py", line 226, in maybe_notify
        model = await ensure_async(self._contents_manager.get(path, content=False))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/fcollonval/miniconda3/envs/kernel-client/lib/python3.12/site-packages/jupyter_core/utils/__init__.py", line 198, in ensure_async
        result = await obj
                 ^^^^^^^^^
      File "/home/fcollonval/miniconda3/envs/kernel-client/lib/python3.12/site-packages/jupyter_server/services/contents/filemanager.py", line 910, in get
        raise web.HTTPError(404, "No such file or directory: %s" % path)
    tornado.web.HTTPError: HTTP 404: Not Found (No such file or directory: test-c3d69e549bba475b876203b758f9c616.ipynb)

Reproduce

  1. Start a jupyter-server
  2. Open and edit a document
  3. Delete the document out of band

Expected behavior

This is a tricky question, I guess we should stop watching the file and stop the room if nobody is there. If the room is still live, I guess the file will eventually be recreated.

I didn't yet analyze if the room was still there or not.

Context

jupyter_client            8.6.3
jupyter-collaboration     3.0.1
jupyter-collaboration-ui  1.0.1
jupyter_core              5.7.2
jupyter-docprovider       1.0.1
jupyter-events            0.10.0
jupyter-lsp               2.2.5
jupyter_server            2.14.2
jupyter_server_fileid     0.9.3
jupyter_server_terminals  0.5.3
jupyter-server-ydoc       1.0.1
jupyter-ydoc              3.0.2
@fcollonval fcollonval added the bug Something isn't working label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant