root_dir
for Contents Manager not loaded from config file
#134
Labels
Milestone
root_dir
for Contents Manager not loaded from config file
#134
I added the lines
to
~/.jupyter/jupyter_notebook_config.py
.I then ran the Jupyter notebook server in debug mode, as follows (the setting of
notebook_dir
is deliberate):EDIT: the exact same things happen when using the command
and as far as I can tell, JupyterLab uses Notebook's contents manager anyway /EDIT
and it confirmed that the config file was loaded:
My notebook server extension, which uses the
.save
method of the contents manager to save a notebook to the user's home directory (well in practice, to theroot_dir
of the contents manager), reports a 403 permissions error when trying to run, and in its log output (see code on GitHub) shows that the value of the contents manager's root directory is the value ofnotebook_dir
, instead of the value specified in the config file.This would be expected if no value of
root_dir
had been specified in the config file, since according to the code, the value ofnotebook_dir
is to be loaded as the default if no value is specified in the configuration. However, a value was specified, and the value ofroot_dir
is supposed to be configurable, so this seems to be a bug.For further evidence that the value of
root_dir
specified in the config file is being ignored, I changed the config file to sayBecause the value of
root_dir
is validated, if this configuration is being loaded, then aTraitError
should be thrown as a result of this configuration setting. However, no errors are raised when starting the notebook server.Random Thoughts:
All I can think of at the moment is that perhaps JupyterLab uses a different contents manager than the Jupyter notebook, maybe a subclass, and that for this reason the configuration is being effectively ignored? But I also changed the value of
c.ContentsManager.root_dir
in the config file, as well asc.LargeFileContentsManager.root_dir
(since as far as I can tell theLargeFileContentsManager
subclass ofFileContentsManager
is actually what's loaded/used), but it still does nothing. I initially thought that this was an issue with JupyterHub, but am now fairly convinced that this is not the case, especially since it's possible to reproduce the problem without running JupyterHub.Note: I originally posted this issue in the Notebook repository, but this has nothing to do with the Notebook frontend, and is about the server backend used by both Lab and Notebook (and JupyterHub-SingleUser), so it seems like it might fit here. Please let me know if that is in fact mistaken.
The text was updated successfully, but these errors were encountered: