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

How to change jupyter lab's open.html file location on Windows 10 #435

Open
lumberbot-app bot opened this issue Mar 4, 2021 · 5 comments
Open

How to change jupyter lab's open.html file location on Windows 10 #435

lumberbot-app bot opened this issue Mar 4, 2021 · 5 comments

Comments

@lumberbot-app
Copy link

lumberbot-app bot commented Mar 4, 2021

Hi,
When I start my jupyter lab server in the Powershell with the jupyter-lab command, the following output displays

Jupyter Server 1.4.1 is running at:
[I 2021-03-01 16:37:43.498 ServerApp] http://localhost:8888/lab?token=48f3f45f1d874b47b48474be9e71dfe44356834b5585c234
[I 2021-03-01 16:37:43.499 ServerApp]  or http://127.0.0.1:8888/lab?token=48f3f45f1d874b47b48474be9e71dfe44356834b5585c234
[I 2021-03-01 16:37:43.499 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2021-03-01 16:37:43.565 ServerApp]

    To access the server, open this file in a browser:
        file:///C:/Users/<my username>/AppData/Roaming/jupyter/runtime/jpserver-22204-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/lab?token=48f3f45f1d874b47b48474be9e71dfe44356834b5585c234
     or http://127.0.0.1:8888/lab?token=48f3f45f1d874b47b48474be9e71dfe44356834b5585c234

and the browser opens the jpserver-22204-open.html.

The thing is that this file is not located in the described path but rather in C:\Users\<my username>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\Roaming\jupyter\runtime

Of course the browser displays a nice ERR_FILE_NOT_FOUND since that file does not exist.

I installed Python 3.9 via the Microsoft Store and Jupyter Lab via pip.
Seems like Jupyter thinks it is installed in another directory. How to change the default file location or even better, directly make the browser to open on localhost:8888and not the open.html file?
I tried setting the c.NotebookApp.use_redirect_file variable to False in the jupyter-notebook-config.py but it did not change anything.

Thanks.


Originally opened as jupyter/notebook#5996 by @AntoineLu, migration requested by @Zsailer

@lumberbot-app
Copy link
Author

lumberbot-app bot commented Mar 4, 2021

@loginov671 commented: I have the same issue, but i solved it by reinstalling python from python.org

@lumberbot-app
Copy link
Author

lumberbot-app bot commented Mar 4, 2021

I was not able to apply the following label(s): component:Server

@jasongrout
Copy link
Contributor

FYI, @florianbussmann has done some more extensive investigative work into this issue in the JLab issue linked above: jupyterlab/jupyterlab#9250 (comment)

@kevin-bates
Copy link
Member

Thanks @jasongrout and @florianbussmann. I agree this is a server issue. I'm just unsure at what scope to address something like this (as @florianbussmann mentions). My initial thought would be to start with only addressing the reported location for now rather than moving the realpath conversion into jupyter_core. My concern is that there could be references using the "logical value" that would then get a mismatch since those instances would be converted to the "physical value" right away.

If you both agree, I think PRs (preferably in notebook and jupyter_server) would be ideal.

Are there other areas (outside of browser open file) where this might also be an issue? I'm still not quite following when (or what type of) access to the "logical value" triggers no-such-file.

@kevin-bates
Copy link
Member

I just noticed @florianbussmann's PR in jupyter_core from about 20 minutes ago. If we're fairly confident the "logical vs. physical" references won't be an issue, then I'd agree with that location. Let's see how that PR goes before doing anything here (or notebook).

Zsailer added a commit to Zsailer/jupyter_server that referenced this issue Nov 18, 2022
…ection (jupyter-server#435)

* override the nudge method and disable busy check

* add a soft nudge when a kernel fails to connecT

* close socket after

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

No branches or pull requests

3 participants