-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
open_browser=False doesn't work anymore #145
Comments
This seems to be working for me. The following commands:
both prevent a browser from opening. Further, using the What, exactly, are you calling on your command line? |
Specifying "no browser" on the command line as above works for me - although according to a newly generated default configuration this should not be necessary because false is now the default.
...opens the browser.
|
Using
|
If I put Conclusion:
|
The strange thing is that none of the above should actually matter if the generated default configuration is true about |
Confirming what @thorstenkampe says: it only works if |
cc @willingc |
It does seem like Jupyter Server defaults to That seems odd to me. @Zsailer, do you happen to know what is going on there? |
It seems that JupyterLab overrides that default open_browser option: https://github.com/jupyterlab/jupyterlab/blob/22f33dabe5728cc0895815e27caca25e8ab5d174/jupyterlab/labapp.py#L549-L552 |
This looks like relevant default config for Jupyter Server ExtensionApps: https://github.com/jupyter-server/jupyter_server/blob/60c66b6a1ce26c474efae8bb8e77de621a58272c/jupyter_server/extension/application.py#L147-L152 |
Work in progress: jupyter-server/jupyter_server#375 |
Things should be better now by upgrading jupyter_server, i.e. You'll temporarily get a warning that looks like:
until nbclassic handles this trait. |
Update nbclassic to With Thanks, all! |
I'm encountering this issue now. I'm not able to start jupyter lab in a headless environment despite having $ pip freeze | grep jupy
jupyter-client==6.1.11
jupyter-core==4.7.1
jupyter-resource-usage==0.5.1
jupyter-server==1.4.0
jupyterlab==3.0.8
jupyterlab-pygments==0.1.2
jupyterlab-server==2.2.1
jupytext==1.10.2
$ cat ~/.jupyter/jupyter_server_config.py | grep browser
c.NotebookApp.open_browser = False
c.ServerApp.open_browser = False
$ jupyter lab
[I 2021-02-19 10:17:11.664 ServerApp] jupyter_resource_usage | extension was successfully linked.
[W 2021-02-19 10:17:11.672 LabApp] 'token' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.672 LabApp] 'password' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.672 LabApp] 'password' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.672 LabApp] 'port' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.672 LabApp] 'allow_root' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.672 LabApp] 'ip' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.672 LabApp] 'allow_origin_pat' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.673 LabApp] 'allow_remote_access' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.673 LabApp] 'disable_check_xsrf' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.673 LabApp] 'base_url' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2021-02-19 10:17:11.682 ServerApp] jupyterlab | extension was successfully linked.
[I 2021-02-19 10:17:11.682 ServerApp] jupytext | extension was successfully linked.
[W 2021-02-19 10:17:11.686 NotebookApp] 'token' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.686 NotebookApp] 'password' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.686 NotebookApp] 'password' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.687 NotebookApp] 'port' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.687 NotebookApp] 'allow_root' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.687 NotebookApp] 'ip' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.687 NotebookApp] 'allow_origin_pat' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.687 NotebookApp] 'allow_remote_access' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.687 NotebookApp] 'disable_check_xsrf' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-02-19 10:17:11.687 NotebookApp] 'base_url' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2021-02-19 10:17:11.971 ServerApp] nbresuse | extension was found and enabled by nbclassic. Consider moving the extension to Jupyter Server's extension paths.
[I 2021-02-19 10:17:11.971 ServerApp] nbresuse | extension was successfully linked.
[I 2021-02-19 10:17:11.971 ServerApp] nbclassic | extension was successfully linked.
[W 2021-02-19 10:17:11.990 ServerApp] All authentication is disabled. Anyone who can connect to this server will be able to run code.
[I 2021-02-19 10:17:11.994 ServerApp] jupyter_resource_usage | extension was successfully loaded.
[I 2021-02-19 10:17:11.995 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.7/site-packages/jupyterlab
[I 2021-02-19 10:17:11.995 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab
[I 2021-02-19 10:17:11.999 ServerApp] jupyterlab | extension was successfully loaded.
[I 2021-02-19 10:17:11.999 ServerApp] [Jupytext Server Extension] Deriving a JupytextContentsManager from LargeFileManager
[I 2021-02-19 10:17:12.001 ServerApp] jupytext | extension was successfully loaded.
[I 2021-02-19 10:17:12.006 ServerApp] nbclassic | extension was successfully loaded.
[W 2021-02-19 10:17:12.006 ServerApp] nbresuse | extension failed loading with message: Duplicated timeseries in CollectorRegistry: {'total_memory_usage'}
[I 2021-02-19 10:17:12.006 ServerApp] Serving notebooks from local directory: /some/directory
[I 2021-02-19 10:17:12.007 ServerApp] Jupyter Server 1.4.0 is running at:
[I 2021-02-19 10:17:12.007 ServerApp] http://localhost:8080/lab
[I 2021-02-19 10:17:12.007 ServerApp] or http://127.0.0.1:8080/lab
[I 2021-02-19 10:17:12.007 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/jupyter_server/serverapp.py", line 2018, in launch_browser
browser = webbrowser.get(self.browser or None)
File "/usr/local/lib/python3.7/webbrowser.py", line 65, in get
raise Error("could not locate runnable browser")
webbrowser.Error: could not locate runnable browser
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/jupyter-lab", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/jupyter_server/extension/application.py", line 520, in launch_instance
serverapp.start()
File "/usr/local/lib/python3.7/site-packages/jupyter_server/serverapp.py", line 2100, in start
self.start_app()
File "/usr/local/lib/python3.7/site-packages/jupyter_server/serverapp.py", line 2059, in start_app
self.launch_browser()
File "/usr/local/lib/python3.7/site-packages/jupyter_server/serverapp.py", line 2020, in launch_browser
self.log.warning(_('No web browser found: %s.') % e)
UnboundLocalError: local variable '_' referenced before assignment Note that I have the properties duplicated over Any ideas? |
Up until the new version 3
c.LabApp.open_browser = False
used to work when startingjupyter-lab
. The setting is nowc.ServerApp.open_browser
and it defaults toFalse
but a browser window is opened every time I startjupyter-lab
.The text was updated successfully, but these errors were encountered: