Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whether the preferred-dir parameter can accept relative paths #647

Open
xuoutput opened this issue Dec 23, 2021 · 2 comments
Open

Whether the preferred-dir parameter can accept relative paths #647

xuoutput opened this issue Dec 23, 2021 · 2 comments

Comments

@xuoutput
Copy link

Problem

➜   jupyter --version
Selected Jupyter core packages...
IPython          : 7.30.1
ipykernel        : 5.5.5
ipywidgets       : not installed
jupyter_client   : 7.1.0
jupyter_core     : 4.9.1
jupyter_server   : 1.13.1
jupyterlab       : 3.2.5
nbclient         : 0.5.9
nbconvert        : 6.3.0
nbformat         : 5.1.3
notebook         : 6.4.6
qtconsole        : not installed
traitlets        : 5.1.1

tree /home

/home/
├── other_user
│   └── hi.txt
└── user
    └── getting_started.ipynb

When I do not start jupyterlab in the /home path

jupyter lab --notebook-dir='/home' --preferred-dir='other_user'
# or
jupyter lab --notebook-dir='/home' --preferred-dir='./other_user'

[C 2021-12-22 22:16:22.818 ServerApp] Bad config encountered during initialization: No such preferred dir: ''/other_user''
# or
[C 2021-12-22 22:11:45.671 ServerApp] Bad config encountered during initialization: preferred_dir must be equal or a subdir of root_dir: ''/user''

When I start jupyterlab in the /home path, it is normal

solution

➜   jupyter lab  --notebook-dir='/home' --preferred-dir='/home/other_user'

Proposed Solution

Whether the preferred-dir parameter can accept relative paths

Additional context

@welcome
Copy link

welcome bot commented Dec 23, 2021

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@krassowski
Copy link
Collaborator

Hi @xuoutput I think that this was fixed in jupyterlab/jupyterlab_server#233. You can test it after upgrading to latest jupyterlab_server with pip install -U jupyterlab-server (or conda/mamba equivalent).

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

No branches or pull requests

2 participants