Skip to content

fix Can't open a directory named checkpoints #12408#947

Open
eastonsuo wants to merge 1 commit into
jupyter-server:mainfrom
eastonsuo:main
Open

fix Can't open a directory named checkpoints #12408#947
eastonsuo wants to merge 1 commit into
jupyter-server:mainfrom
eastonsuo:main

Conversation

@eastonsuo
Copy link
Copy Markdown
Contributor

@eastonsuo eastonsuo commented Aug 17, 2022

@eastonsuo eastonsuo changed the title fix Can't open a directory named checkpoints #12408 https://github.co… fix Can't open a directory named checkpoints #12408 Aug 17, 2022
@Zsailer
Copy link
Copy Markdown
Member

Zsailer commented Feb 16, 2023

Hey @eastonsuo, apologies that the team hasn't responded here.

This has been a long standing issue in Jupyter-Server that requires a bit more nuanced work to allow these paths. Unfortunately, as this PR stands, it solves the immediate issue, but removes critical existing APIs. To fully address the issue, we'd need to think carefully about deprecating the old APIs and special-casing the checkpoints+trust endpoints.

@clouds56
Copy link
Copy Markdown

What about this? for a file name is contents, we could access it with /api/contents/path/to/contents/contents.

default_handlers = [
    (r"/api/contents%s/contents" % path_regex, ContentsHandler), # add this line
    (r"/api/contents%s/checkpoints" % path_regex, CheckpointsHandler),
    (
        r"/api/contents%s/checkpoints/%s" % (path_regex, _checkpoint_id_regex),
        ModifyCheckpointsHandler,
    ),
    (r"/api/contents%s/trust" % path_regex, TrustNotebooksHandler),
    (r"/api/trust%s/trust" % path_regex, TrustNotebooksHandler),
    (r"/api/contents%s" % path_regex, ContentsHandler),
    (r"/api/notebooks/?(.*)", NotebooksRedirectHandler),
]

If contents is thought too common, we could name it :raw_contents, since rare filename contains :

@Carreau Carreau added this to the Future milestone May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jupyter notebook can't open the dir named "checkpoints"

4 participants