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

jupter_notebook_config.py not being executed #136

Closed
dylanraws opened this issue Aug 2, 2022 · 9 comments · Fixed by #137
Closed

jupter_notebook_config.py not being executed #136

dylanraws opened this issue Aug 2, 2022 · 9 comments · Fixed by #137

Comments

@dylanraws
Copy link

Description

Since upgrading from nbclassic v0.3.7 to v0.4.3, starting jupyter with jupyter nbclassic is no longer executing ~/.jupyter/jupyter_notebook_config.py. The ~/.jupyter/jupyter_server_config.py file is still being executed (same as before).

Expected behavior

When running jupyter nbclassic, the jupyter_notebook_config.py file should be executed.

Steps to reproduce

  1. pip install notebook==6.* nbclassic==0.4.3
  2. Add invalid syntax to the ~/.jupyter/jupyter_server_config.py file
  3. Add invalid syntax to the ~/.jupyter/jupyter_notebook_config.py file
  4. Start the jupyter server with jupyter nbclassic
  5. Observe in the output that the syntax error was only observed for jupyter_server_config.py, not for jupyter_notebook_config.py

When repeating the steps with nbclassic==0.3.7, the syntax error can be seen for both config files, proving that both are being executed.

@echarles
Copy link
Member

echarles commented Aug 3, 2022

@Zsailer you mentioned a potential issue in the notebook_shim. Do you confirm the issue would be there or do we need to look in nbclassic (I can imagine the issue is on that side).

@Zsailer
Copy link
Member

Zsailer commented Aug 3, 2022

@echarles this was caused by #130.

Changing the name attribute from "notebook" to "nbclassic" changes the behavior of traitlets to look for jupyter_nbclassic_config instead of jupyter_notebook_config.

@Zsailer
Copy link
Member

Zsailer commented Aug 3, 2022

We can likely pick up these config files in notebook_shim, but this may take some work. I'll try to carve out time today/tomorrow to develop a fix.

@echarles
Copy link
Member

echarles commented Aug 3, 2022

We had to change the extension name to allow installing both notebook. (v7) and nbclassic extensions at the same time.

Sound like notebook_shim is a good place to handle that change and add there the loading of the jupyter_notebook_config files. Happy to review and help.

@minrk
Copy link
Member

minrk commented Aug 4, 2022

fwiw, this specific issue can be addressed by explicitly setting config_file_name = 'jupyter_notebook_config' in the nbclassic ExtensionApp. The default is to use jupyter_{name}_config, but it can be set directly.

@echarles
Copy link
Member

echarles commented Aug 4, 2022

fwiw, this specific issue can be addressed by explicitly setting config_file_name = 'jupyter_notebook_config' in the nbclassic ExtensionApp. The default is to use jupyter_{name}_config, but it can be set directly.

That is a excellent hint.

Stepping back a bit, what do we want as behavior? should just jupyter_notebook_config be read, or jupyter_nbclassic_config only, or both?

We don't want the admin/user, especially that some trait are already converted (with warning) by notebook_shim to the jupyter_server traits.

If we want to build something crazy, we can convert the notebook traits to nbclassic traits, among some of them would be converted to server ones (please let's not do that).

@minrk
Copy link
Member

minrk commented Aug 4, 2022

My understanding of the goal of nbclassic is to get the classic notebook experience delivered while running on the updated Jupyter server. That is, keep everything as-is working (config, extensions, etc.). That suggests it should load existing config names and not defining new ones.

But this is also notebook 7, right? I'm not really sure nbclassic has a place in a future with notebook 7, since nbclassic is really the same thing as notebook 7, before notebook 7. So it seems to me that nbclassic will be deprecated in favor of notebook 7 once it arrives, and the two should behave identically. Or is that wrong?

@echarles
Copy link
Member

echarles commented Aug 5, 2022

fwiw, this specific issue can be addressed by explicitly setting config_file_name = 'jupyter_notebook_config' in the nbclassic ExtensionApp. The default is to use jupyter_{name}_config, but it can be set directly.

@Zsailer I have just discussed with @RRosio and @ericsnekbytes. It sound to us that @minrk proposal could just be applied to solve this issue. WDYT?

@Zsailer
Copy link
Member

Zsailer commented Aug 5, 2022

Sure, this makes sense to me. I opened #137 to fix this.

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

Successfully merging a pull request may close this issue.

4 participants