Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

api/session names are URL encoded and display incorrectly in a jupyter server #25

Open
terencehonles opened this issue Feb 19, 2021 · 1 comment

Comments

@terencehonles
Copy link

When connecting colab to a Jupyter server the frontend application sends URL encoded parameters to /api/sessions which causes the API to return hard to read names. While this is coming from the frontend, if the backend needs the URL encoding this can be undone in this package when forwarding the API request to the Jupyter server.

This can be seen by creating a notebook in drive with a character which needs to be escaped and looking at the websocket connections that are happening to the handler this package provides.

An example response from /api/sessions after loading such a notebook might be the following:

[
    {
        "id": "fa293a7e-afb2-4fca-92c2-ffb9e548e052",
        "kernel": {
            "connections": 0,
            "execution_state": "idle",
            "id": "0ece430d-e288-4907-973f-d58a6d8010ff",
            "last_activity": "2021-02-17T06:31:48.663580Z",
            "name": "Python"
        },
        "name": "%5Btest%5D%20example%20notebook.ipynb",
        "notebook": {
            "name": "%5Btest%5D%20example%20notebook.ipynb",
            "path": "fileId=?????????????????????????????????"
        },
        "path": "fileId=?????????????????????????????????",
        "type": "notebook"
    }
]

While the expected response would instead include the string [test] example notebook.ipynb.

@terencehonles
Copy link
Author

This may actually belong in https://github.com/googlecolab/colabtools if it is not fixed in this package and the frontend is adjusted.

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

No branches or pull requests

1 participant