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

nbclassic does not work with Notebook v7 if Jupyter server is not running at / #164

Closed
mcrutch opened this issue Oct 14, 2022 · 3 comments · Fixed by #165
Closed

nbclassic does not work with Notebook v7 if Jupyter server is not running at / #164

mcrutch opened this issue Oct 14, 2022 · 3 comments · Fixed by #165

Comments

@mcrutch
Copy link
Contributor

mcrutch commented Oct 14, 2022

When we run Jupyter we run it at /Jupyter/ or similar because it is one of many services running on the same box. I can visit nbclassic as /Jupyter/nbclassic/tree but then it munges the url to be /nbclassic/Jupyter/noteoboks/.ipynb

I confirmed IPython.notebook.base_url has the correct value (/Jupyter/) when in the notebooks page, so it looks like the nbclassic, and base_url components are just being switched somewhere

@mcrutch mcrutch changed the title nbclassic does not work if Jupyter server is not running at / nbclassic does not work with Notebook v7 if Jupyter server is not running at / Oct 14, 2022
@mcrutch
Copy link
Contributor Author

mcrutch commented Oct 17, 2022

Pretty sure it is because you have the parameters flipped in situations like this. The Base URL of the server should be inserted BEFORE the url of NBClassic.

that.base_url_prefix, that.base_url, 'notebooks',

@echarles
Copy link
Member

Great catch. do you feel like opening a PR for this?

@mcrutch
Copy link
Contributor Author

mcrutch commented Oct 17, 2022

I am digging through this a bit now, but it is hard to trace all the spots affected

mcrutch added a commit to mcrutch/nbclassic that referenced this issue Oct 17, 2022
…s installed

Also resolves an issue where New->New Notebook did not respect the "/nbclassic/" in the url if it was set
Personally not a fan of the var still being called base_url_prefix but wans't willing to make that big of a change
Closes jupyter#164
echarles pushed a commit that referenced this issue Oct 18, 2022
* Allow NBClassic to work if ServerApp.base_url is set and Notebook 7 is installed
Also resolves an issue where New->New Notebook did not respect the "/nbclassic/" in the url if it was set
Personally not a fan of the var still being called base_url_prefix but wans't willing to make that big of a change
Closes #164

* Change name of url prefix to be more appropriate
Rename base_url_prefix to nbclassic_path
rename baseUrlPrefix to nbclassicPath
rename url_prefix_notebook() to nbclassic_path()
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.

2 participants