-
Notifications
You must be signed in to change notification settings - Fork 29
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
conda tab in classical notebook pod spawned from Jupyterhub has unwanted warnings. #47
Comments
@HCharlie Thanks for reporting the error. The redirection url is used there (for the classical notebook): https://github.com/fcollonval/jupyter_conda/blob/master/jupyter_conda/static/models.js#L138 I have never seen an error before - but I'm not using JHub often - and certainly not on Kubernetes unfortunately. The redirected url is built on that line: https://github.com/fcollonval/jupyter_conda/blob/master/jupyter_conda/handlers.py#L141 As you can see it is only partial. Could you test the following change on jupyter_conda/static/models.js#L138: - xhr.getResponseHeader("Location") || url,
+ (urls.base_url + xhr.getResponseHeader("Location")) || url, |
@fcollonval Thanks for your reply. And unfortunately, the above solution is not working, but I think we are getting close. The new url is illustrated below. Originally we were lacking the base url |
Sorry, I wrote the correction too quickly. The following should be better: - xhr.getResponseHeader("Location") || url,
+ xhr.getResponseHeader("Location") ? (urls.base_url + xhr.getResponseHeader("Location")) : url, |
np :), this time it's working 🎆 , no more warning pop up at the beginning after clicking conda tab. While after clicking the + sign to create a new conda environment, there is a double slash in the URL like this |
Thank for helping getting to the bottom of this bug. |
Description
In the classical notebook server(pod) spawned from Jupyterhub, when I click the Conda tab, it will pop up a warning window telling me an error
An error occurred while retrieving package information.
Reproduce
I was following Zero to JupyterHub with Kubernetes(https://zero-to-jupyterhub.readthedocs.io/en/latest/index.html) and using KIND(https://kind.sigs.k8s.io/docs/user/quick-start/) to set up the k8s cluster.
And the singleuser image I use is base-notebook from docker-stacks(https://github.com/jupyter/docker-stacks/blob/master/base-notebook/Dockerfile) with modification only to install jupyter_conda package.
After everything is setup. Just go to classical notebook and click Conda tab, you would see the window pop up.
Expected behavior
No warning shows up.
Context
Jupyterhub: 0.8.2
jupyter_conda: latest
What I see
in which
test.hub.kind.test 127.0.0.1
in /etc/hoststhe request URL somehow end up with
/hub/conda/task/...
instead of/user/username/conda/task/...
with which using wget will not give 404 code.The text was updated successfully, but these errors were encountered: