• Bug#1105921: python3-nbclassic: Refusing to serve hidden directory, via

    From =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-@21:1/5 to All on Sat May 17 12:20:01 2025
    Package: python3-nbclassic
    Severity: important

    Dear Maintainer,

    while trying start a classic notebook from jupyterhub, I got this error message

    [D 2025-05-17 08:32:43.583 oauthlib.oauth2.rfc6749.endpoints.token token:112] Dispatching grant_type authorization_code request to <oauthlib.oauth2.rfc6749.grant_types.authorization_code.AuthorizationCodeGrant object at 0x7f9cfee01a90>.
    [D 2025-05-17 08:32:43.583 JupyterHub provider:58] authenticate_client <oauthlib.Request SANITIZED>
    [D 2025-05-17 08:32:43.621 oauthlib.oauth2.rfc6749.grant_types.authorization_code authorization_code:533] Using provided redirect_uri /user/picca/oauth_callback
    [D 2025-05-17 08:32:43.621 JupyterHub provider:117] confirm_redirect_uri: client_id=jupyterhub-user-picca, redirect_uri=/user/picca/oauth_callback
    [D 2025-05-17 08:32:43.621 oauthlib.oauth2.rfc6749.grant_types.authorization_code authorization_code:301] Token request validation ok for <oauthlib.Request SANITIZED>.
    [D 2025-05-17 08:32:43.622 JupyterHub provider:345] Saving bearer token {'access_token': 'REDACTED', 'expires_in': 1209600, 'token_type': 'Bearer', 'scope': 'read:users:groups!user access:servers!server=picca/ read:users:name!user', 'refresh_token': '
    REDACTED'}
    [D 2025-05-17 08:32:43.635 JupyterHub provider:205] Deleting oauth code wT2... for jupyterhub-user-picca
    [I 2025-05-17 08:32:43.650 JupyterHub log:192] 200 POST /hub/api/oauth2/token (picca@127.0.0.1) 71.28ms
    [D 2025-05-17 08:32:43.657 JupyterHub base:366] Recording first activity for <APIToken('gEuc...', user='picca', client_id='jupyterhub-user-picca')>
    [I 2025-05-17 08:32:43.665 JupyterHub log:192] 200 GET /hub/api/user (picca@127.0.0.1) 11.88ms
    [I 2025-05-17 08:32:43.666 ServerApp] Logged-in user picca
    [I 2025-05-17 08:32:43.667 ServerApp] Setting new xsrf cookie for b'e3f475fdd7ac48f99c702f8ba5d39f8b:4781760833cd6eda1d014f07eb2f352cdadc3de66e9cd241b40346af670fad8b' {'path': '/user/picca/'}
    [I 2025-05-17 08:32:43.671 ServerApp] 302 GET /user/picca/oauth_callback?code=[secret]&state=[secret] -> /user/picca/tree? (picca@::ffff:127.0.0.1) 93.66ms
    /usr/lib/python3/dist-packages/nbclassic/tree/handlers.py:51: RuntimeWarning: coroutine 'AsyncFileContentsManager.dir_exists' was never awaited
    if cm.dir_exists(path=path):
    RuntimeWarning: Enable tracemalloc to get the object allocation traceback /usr/lib/python3/dist-packages/nbclassic/tree/handlers.py:52: RuntimeWarning: coroutine 'AsyncFileContentsManager.is_hidden' was never awaited
    if cm.is_hidden(path) and not cm.allow_hidden:
    RuntimeWarning: Enable tracemalloc to get the object allocation traceback
    [I 2025-05-17 08:32:43.691 NotebookApp] Refusing to serve hidden directory, via 404 Error


    I am wondering if nbclassic is compatible with all the jupyter stack currently available in trixie.

    Cheers

    Fred

    -- System Information:
    Debian Release: 13.0
    APT prefers unstable
    APT policy: (500, 'unstable'), (500, 'testing')
    Architecture: amd64 (x86_64)
    Foreign Architectures: i386

    Kernel: Linux 6.12.27-amd64 (SMP w/6 CPU threads; PREEMPT)
    Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From picca@21:1/5 to All on Wed May 21 10:10:01 2025
    To reproduce this issue, just run

    jupyter nblassic

    picca@page:~$ jupyter nbclassic
    [W 2025-05-21 08:35:39.406 ServerApp] A `_jupyter_server_extension_points` function was not found in nbclassic. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future
    releases of Jupyter Server.
    [W 2025-05-21 08:35:39.411 ServerApp] A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future
    releases of Jupyter Server.
    [I 2025-05-21 08:35:39.414 ServerApp] jupyter_server_terminals | extension was successfully linked.
    [I 2025-05-21 08:35:39.563 ServerApp] nbclassic | extension was successfully linked.
    [I 2025-05-21 08:35:39.565 ServerApp] notebook_shim | extension was successfully linked.
    [I 2025-05-21 08:35:39.625 ServerApp] notebook_shim | extension was successfully loaded.
    [I 2025-05-21 08:35:39.626 ServerApp] jupyter_server_terminals | extension was successfully loaded.
    [I 2025-05-21 08:35:39.629 ServerApp] nbclassic | extension was successfully loaded.
    [I 2025-05-21 08:35:39.632 ServerApp] Serving notebooks from local directory: /home/picca
    [I 2025-05-21 08:35:39.632 ServerApp] Jupyter Server 2.15.0 is running at:
    [I 2025-05-21 08:35:39.632 ServerApp] http://localhost:8888/tree?token=5990de7375c2b246397260a5e97acc68a73c7d20bd1fd67c
    [I 2025-05-21 08:35:39.632 ServerApp] http://127.0.0.1:8888/tree?token=5990de7375c2b246397260a5e97acc68a73c7d20bd1fd67c
    [I 2025-05-21 08:35:39.632 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
    [C 2025-05-21 08:35:39.650 ServerApp]

    To access the server, open this file in a browser:
    file:///home/picca/.local/share/jupyter/runtime/jpserver-127457-open.html
    Or copy and paste one of these URLs:
    http://localhost:8888/tree?token=5990de7375c2b246397260a5e97acc68a73c7d20bd1fd67c
    http://127.0.0.1:8888/tree?token=5990de7375c2b246397260a5e97acc68a73c7d20bd1fd67c
    /usr/lib/python3/dist-packages/nbclassic/tree/handlers.py:51: RuntimeWarning: coroutine 'AsyncFileContentsManager.dir_exists' was never awaited
    if cm.dir_exists(path=path):
    RuntimeWarning: Enable tracemalloc to get the object allocation traceback /usr/lib/python3/dist-packages/nbclassic/tree/handlers.py:52: RuntimeWarning: coroutine 'AsyncFileContentsManager.is_hidden' was never awaited
    if cm.is_hidden(path) and not cm.allow_hidden:
    RuntimeWarning: Enable tracemalloc to get the object allocation traceback
    [I 2025-05-21 08:35:40.964 NotebookApp] Refusing to serve hidden directory, via 404 Error
    [W 2025-05-21 08:35:41.029 NotebookApp] 404 GET /tree?token=[secret] (ba00f11359c44e76a06eba2a00bf29a5@127.0.0.1) 68.84ms referer=None

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)