jupyter / jupyter/notebook

Different kernel name restrictions in different parts of the jupyter stack

Open
#853 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

All my kernels which have a '-' in the name (aka `monte-carlo`, `julia-0.4` or `conda-envname`) don't get a logo served (i.e. there is no logo in the upper right corner).
- http://localhost:8888/kernelspecs/python3/logo-64x64.png -> works as it is the default kernel resource dir
- http://localhost:8888/kernelspecs/monte-carlo/logo-64x64.png -> does not work and there is such a log in the user kernel dir
- http://localhost:8888/kernelspecs/conda-dev_34/logo-64x64.png -> does not work (this is a kernel from https://github.com/Cadair/jupyter_environment_kernels/pull/6 which includes a patch to set the ressource dir to RESOURCE -> same as the default kernel ressource). It also works if I change the name of the generated kernel names to `conda_envname`.
- http://localhost:8888/kernelspecs/r_default/logo-64x64.png -> work, is a kernel in the user kernel dir and has logos included.

It seems that the specific handler https://github.com/jupyter/notebook/blob/master/notebook/kernelspecs/handlers.py doesn't even see this request (added a few prints and the prints never showed up) so I suspect that there is somwhere a regex which swallows such URLs early?

Contributor guide

Open the contributing guide

Research direction

Start by reading notebook/kernelspecs/handlers.py and reproduce the logo requests for kernel names containing '-' versus '_'. Trace where the hyphenated URL is handled before that entry point, then verify that logo-64x64.png is served consistently for the listed kernel names.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.