jupyter_core icon indicating copy to clipboard operation
jupyter_core copied to clipboard

Jupyter --paths incorrect output

Open mlucool opened this issue 3 years ago • 2 comments

Hi,

jupyter --paths outputs:

$ jupyter --paths
config:
    /path/to/user/.jupyter
    /path/to/venv/etc/jupyter
    /usr/local/etc/jupyter
    /etc/jupyter
data:
    /path/to/user/.local/share/jupyter
    /path/to/venv/share/jupyter
    /usr/local/share/jupyter
    /usr/share/jupyter
runtime:
    /path/to/user/.local/share/jupyter/runtime

Surprisingly, if you have a file named /path/to/user/jupyter_notebook_config.py it get's used too! I'm not sure if this is a bug in the output of --paths or a bug in which files should be used for config (or if this a bug in jupyter_server).

mlucool avatar May 14 '21 12:05 mlucool

Can you use the --debug switch to see why it is giving those paths?

jasongrout avatar May 14 '21 13:05 jasongrout

DEBUG 09:34:27 Searching ['/path/to/user', '/path/to/user/.jupyter', '/path/to/venv/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
DEBUG 09:34:27 Looking for jupyter_config in /etc/jupyter
DEBUG 09:34:27 Looking for jupyter_config in /usr/local/etc/jupyter
DEBUG 09:34:27 Looking for jupyter_config in /path/to/venv/etc/jupyter
DEBUG 09:34:27 Looking for jupyter_config in /path/to/user/.jupyter
DEBUG 09:34:27 Looking for jupyter_config in /path/to/user
DEBUG 09:34:27 Looking for jupyter_server_config in /etc/jupyter
DEBUG 09:34:27 Looking for jupyter_server_config in /usr/local/etc/jupyter
DEBUG 09:34:27 Looking for jupyter_server_config in /path/to/venv/etc/jupyter

I think what's happening is the cwd is being picked up at runtime but not via --paths: https://github.com/jupyter/jupyter_core/blob/e69a436529838dce8b41e6d4508f94930c87b559/jupyter_core/application.py#L72

mlucool avatar May 14 '21 13:05 mlucool