jupyter / help

:sparkles: Need some help or have some questions? Please visit our Discourse page.
https://discourse.jupyter.org
291 stars 97 forks source link

Cannot paste URL directly when using Jupyter notebook on local network #449

Closed jontwo closed 5 years ago

jontwo commented 5 years ago

When running Jupyter notebook on a local server, the URL provided can't be copied and pasted directly into a browser. For example:

$ jupyter notebook --ip=0.0.0.0
[I 09:11:58.491 NotebookApp] Serving notebooks from local directory: /home/jontwo/repositories [I 09:11:58.491 NotebookApp] The Jupyter Notebook is running at:
[I 09:11:58.491 NotebookApp] http://(servername or 127.0.0.1):8888/?token=0f3201eec3db4d5ec99cbdf1b9357dcc9351955f742762d3
[I 09:11:58.491 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 09:11:58.491 NotebookApp] No web browser found: could not locate runnable browser.
[C 09:11:58.491 NotebookApp]

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://(servername or 127.0.0.1):8888/?token=0f3201eec3db4d5ec99cbdf1b9357dcc9351955f742762d3

It would be more useful if the message was something like:


    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://servername:8888/?token=0f3201eec3db4d5ec99cbdf1b9357dcc9351955f742762d3
        or
        http://127.0.0.1:8888/?token=0f3201eec3db4d5ec99cbdf1b9357dcc9351955f742762d3
minrk commented 5 years ago

This is implemented in https://github.com/jupyter/notebook/pull/4103