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
notebooks_dir ~ expands incorrectly #878
Comments
Note to self: I'm thinking this may have something to do with changes in #748 |
One diff I noticed while debugging, the command line quoting has subtly changed: 0.6.1
vs 0.7.0b1
|
Shell quoting changed in 7da7f7e |
If I change my notebook config for 0.6.1 to simulate the extra double quotes found in 0.7:
then I can reproduce the bug with the 0.6 code base:
So I'm certain the new quoting is causing it. I've traced the |
Without the extra quotes, something (the shell probably) implicitly did ~ expansion in 0.6. But now the value reaches the abspath call here unexpanded, and winds up just getting prefixed with the cwd. In fact, I can hit this problem with notebook 4.2 with: jupyter notebook --notebook-dir='"~/notebooks"'
[C 23:24:27.458 NotebookApp] Bad config encountered during initialization:
[C 23:24:27.458 NotebookApp] No such notebook dir: '/home/bob/~/notebooks' Looks like we just need to do an explicit os.path.expanduser somewhere. |
@parente I think you're exactly right that we need to do an expanduser somewhere. Putting it in the single-user server seems like the right place. |
#890 calls expanduser in single-user server. Perhaps that should work. |
How to reproduce the issue
Configure jupyterhub 0.7.0b1 with:
Try to login. Notebook server startup logs:
What you expected to happen
Path should be expanded properly.
What actually happens
Path is expanded but also gets the ~ part tacked back on.
Share what version of JupyterHub you are using
0.7.0b1
I put a print in the jupyterhub-singleuser script and confirmed that it is receiving
--notebook-dir="~/notebooks"
as insys.argv
. So it appears the incorrect expansion is happening somewhere after that.The text was updated successfully, but these errors were encountered: