Open sfonekk opened 1 year ago
Hi @sfonekk! Thank you for creating this issue. Could you please provide more information and context about this issue? Bug report template has typical rubrics. Filling it out as much as possible would help potential contributors understand and fix the problem.
Hi @sfonekk! Thank you for creating this issue. Could you please provide more information and context about this issue? Bug report template has typical rubrics. Filling it out as much as possible would help potential contributors understand and fix the problem.
Hi @andrii-i Before notebook 6.5.4, in order to experience notebook 7.0.0rc2, I upgraded the notebook version to 7.0.0rc2, started jupyter notebook, and got the above error.
Package notebook took 0.0001s to import
[I 2023-06-27 11:23:51.389 ServerApp] Package jupyter_lsp took 0.1508s to import
[W 2023-06-27 11:23:51.389 ServerApp] A _jupyter_server_extension_points
function was not found in jupyter_lsp. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-06-27 11:23:51.416 ServerApp] Package jupyter_server_fileid took 0.0246s to import
[I 2023-06-27 11:23:51.514 ServerApp] Package jupyter_server_terminals took 0.0967s to import
[I 2023-06-27 11:23:52.050 ServerApp] Package jupyter_server_ydoc took 0.5329s to import
[I 2023-06-27 11:23:52.052 ServerApp] Package jupyterlab took 0.0001s to import
[I 2023-06-27 11:23:52.429 ServerApp] Package nbclassic took 0.0269s to import
[W 2023-06-27 11:23:52.446 ServerApp] A _jupyter_server_extension_points
function was not found in nbclassic. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-06-27 11:23:52.448 ServerApp] Package notebook_shim took 0.0001s to import
[W 2023-06-27 11:23:52.448 ServerApp] A _jupyter_server_extension_points
function was not found in notebook_shim. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-06-27 11:24:00.603 ServerApp] Package panel.io.jupyter_server_extension took 8.1508s to import
[I 2023-06-27 11:24:00.604 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2023-06-27 11:24:00.612 ServerApp] jupyter_server_fileid | extension was successfully linked.
[I 2023-06-27 11:24:00.621 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-06-27 11:24:00.629 ServerApp] jupyter_server_ydoc | extension was successfully linked.
[I 2023-06-27 11:24:00.643 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-06-27 11:24:00.653 ServerApp] nbclassic | extension was successfully linked.
[I 2023-06-27 11:24:00.664 ServerApp] notebook | extension was successfully linked.
[I 2023-06-27 11:24:02.044 ServerApp] Package jupyter_nbextensions_configurator took 0.0030s to import
[W 2023-06-27 11:24:02.046 ServerApp] A _jupyter_server_extension_points
function was not found in jupyter_nbextensions_configurator. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-06-27 11:24:02.047 ServerApp] jupyter_nbextensions_configurator | extension was found and enabled by notebook_shim. Consider moving the extension to Jupyter Server's extension paths.
[I 2023-06-27 11:24:02.049 ServerApp] jupyter_nbextensions_configurator | extension was successfully linked.
[I 2023-06-27 11:24:02.050 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-06-27 11:24:02.051 ServerApp] panel.io.jupyter_server_extension | extension was successfully linked.
[I 2023-06-27 11:24:02.128 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-06-27 11:24:02.132 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2023-06-27 11:24:02.134 ServerApp] [jupyter_nbextensions_configurator] enabled 0.6.3
[I 2023-06-27 11:24:02.135 ServerApp] jupyter_nbextensions_configurator | extension was successfully loaded.
[I 2023-06-27 11:24:02.136 FileIdExtension] Configured File ID manager: ArbitraryFileIdManager
[I 2023-06-27 11:24:02.138 FileIdExtension] ArbitraryFileIdManager : Configured root dir: E:/GoogleDownload
[I 2023-06-27 11:24:02.139 FileIdExtension] ArbitraryFileIdManager : Configured database path: C:\Users\lenovo\AppData\Roaming\jupyter\file_id_manager.db
[I 2023-06-27 11:24:02.154 FileIdExtension] ArbitraryFileIdManager : Successfully connected to database file.
[I 2023-06-27 11:24:02.154 FileIdExtension] ArbitraryFileIdManager : Creating File ID tables and indices with journal_mode = DELETE
[I 2023-06-27 11:24:02.170 FileIdExtension] Attached event listeners.
[I 2023-06-27 11:24:02.171 ServerApp] jupyter_server_fileid | extension was successfully loaded.
[I 2023-06-27 11:24:02.172 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-06-27 11:24:02.175 ServerApp] jupyter_server_ydoc | extension was successfully loaded.
[I 2023-06-27 11:24:02.188 LabApp] JupyterLab extension loaded from C:\Users\lenovo\AppData\Roaming\Python\Python310\site-packages\jupyterlab
[I 2023-06-27 11:24:02.188 LabApp] JupyterLab application directory is C:\Users\lenovo\AppData\Roaming\Python\share\jupyter\lab
[I 2023-06-27 11:24:02.190 LabApp] Extension Manager is 'pypi'.
[I 2023-06-27 11:24:02.196 ServerApp] jupyterlab | extension was successfully loaded.
| | | |_ | | | | __
| || | ' \/ / _
| / -)
_/| ./_,_,|_\|
|_|
Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.
https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html
Please note that updating to Notebook 7 might break some of your extensions.
[I 2023-06-27 11:24:02.221 ServerApp] nbclassic | extension was successfully loaded. [I 2023-06-27 11:24:02.229 ServerApp] notebook | extension was successfully loaded. [I 2023-06-27 11:24:02.231 ServerApp] panel.io.jupyter_server_extension | extension was successfully loaded. [I 2023-06-27 11:24:02.232 ServerApp] Serving notebooks from local directory: E:\GoogleDownload [I 2023-06-27 11:24:02.234 ServerApp] Jupyter Server 2.6.0 is running at: [I 2023-06-27 11:24:02.234 ServerApp] http://localhost:8888/tree?token=7c3b96110f6553a503a42bbebbdf5db4fa79fd521cd31ef7 [I 2023-06-27 11:24:02.235 ServerApp] http://127.0.0.1:8888/tree?token=7c3b96110f6553a503a42bbebbdf5db4fa79fd521cd31ef7 [I 2023-06-27 11:24:02.236 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 2023-06-27 11:24:02.342 ServerApp]
To access the server, open this file in a browser:
file:///C:/Users/lenovo/AppData/Roaming/jupyter/runtime/jpserver-3148-open.html
Or copy and paste one of these URLs:
http://localhost:8888/tree?token=7c3b96110f6553a503a42bbebbdf5db4fa79fd521cd31ef7
http://127.0.0.1:8888/tree?token=7c3b96110f6553a503a42bbebbdf5db4fa79fd521cd31ef7
[I 2023-06-27 11:24:02.563 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server [W 2023-06-27 11:26:24.100 ServerApp] 404 GET /lab/api/settings/@jupyter-notebook/application-extension:shell?1687836384041 (::1): Schema not found: C:/Users/lenovo/AppData/Roaming/Python/share/jupyter/lab/schemas\@jupyter-notebook/application-extension\shell.json [W 2023-06-27 11:26:24.101 LabApp] wrote error: 'Schema not found: C:/Users/lenovo/AppData/Roaming/Python/share/jupyter/lab/schemas\@jupyter-notebook/application-extension\shell.json' Traceback (most recent call last): File "D:\anaconda3\lib\site-packages\tornado\web.py", line 1711, in _execute result = method(*self.path_args, *self.path_kwargs) File "D:\anaconda3\lib\site-packages\tornado\web.py", line 3208, in wrapper return method(self, args, **kwargs) File "C:\Users\lenovo\AppData\Roaming\Python\Python310\site-packages\jupyterlab_server\settings_handler.py", line 48, in get result, warnings = get_settings( File "C:\Users\lenovo\AppData\Roaming\Python\Python310\site-packages\jupyterlab_server\settings_utils.py", line 370, in get_settings schema, version = _get_schema(schemas_dir, schema_name, overrides, labextensions_path) File "C:\Users\lenovo\AppData\Roaming\Python\Python310\site-packages\jupyterlab_server\settings_utils.py", line 47, in _get_schema raise web.HTTPError(404, notfound_error % path) tornado.web.HTTPError: HTTP 404: Not Found (Schema not found: C:/Users/lenovo/AppData/Roaming/Python/share/jupyter/lab/schemas\@jupyter-notebook/application-extension\shell.json)
Hi @sfonekk, do you encounter this problem if you do a fresh install of Notebook 7 in a new environment?
I'm having what I think is a related issue. When I run jupyter using pip-run, it fails when launching notebook with the following output:
And the UI fails to load in the browser.
Extracting the error:
File "/var/folders/f2/2plv6q2n7l932m2x004jlw340000gn/T/pip-run-5b1y6kg1/jupyterlab_server/settings_utils.py", line 55, in _get_schema
raise web.HTTPError(404, notfound_error % path)
tornado.web.HTTPError: HTTP 404: Not Found (Schema not found: /opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json)
This issue emerged semi-recently and can be mitigated by pinning to jupyterlab-server<2.23
:
The issue seems to be that in jupyterlab-server 2.22, something changed with how the schema resources are located, and it's no longer correctly finding "share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json". It appears to be attempting to find it in the sys.prefix (in my case /opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/
).
pip-run
installs the packages using pip install -t temp_dir
and setting PYTHONPATH=temp_dir
before launching Python.
The file is in fact getting installed:
@ find /var/folders/f2/2plv6q2n7l932m2x004jlw340000gn/T/pip-run-s26u_x0_ -name scroll-output.json
/var/folders/f2/2plv6q2n7l932m2x004jlw340000gn/T/pip-run-s26u_x0_/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json
It's just failing to be located when it's not found relative to sys.prefix
.
Installing to a virtualenv works around the issue, but it would be nice if it could be made to work with pip-run
as it had in the past. If this issue isn't the same, please create a new one from this comment and consider transferring it to a different project if "notebook" is not appropriate. Thanks.
Correction - the regression happens between jupyterlab-server 2.22 and 2.23.
Upon further testing, it looks like between v2.22.0 and v2.22.1 the behavior changes. I don't see how that's even plausible. The code changed so little. I'll keep digging.
I put in a couple of breakpoints where the code changes, but neither of those breakpoints were hit when starting up:
Although I thought I'd isolated the issue to just jupyterlab_server
, I see that depending on whether I install 2.22.0 or 2.22.1, I get a very different set of dependencies:
@ diff --unified deps-2.22.0.txt deps-2.22.1.txt
--- deps-2.22.0.txt 2024-03-28 14:23:54
+++ deps-2.22.1.txt 2024-03-28 14:24:09
@@ -7,6 +7,7 @@
argon2-cffi-bindings 21.2.0
arrow 1.3.0
asttokens 2.4.1
+async-lru 2.0.4
attrs 23.2.0
autocommand 2.2.2
Babel 2.14.0
@@ -19,16 +20,17 @@
debugpy 1.8.1
decorator 5.1.1
defusedxml 0.7.1
-entrypoints 0.4
exceptiongroup 1.2.0
executing 2.0.1
fastjsonschema 2.19.1
fqdn 1.5.1
+h11 0.14.0
+httpcore 1.0.5
+httpx 0.27.0
idna 3.6
inflect 7.0.0
ipykernel 6.29.4
ipython 8.22.2
-ipython-genutils 0.2.0
ipywidgets 8.1.2
isoduration 20.11.0
jaraco.context 4.3.0
@@ -42,25 +44,26 @@
jsonschema 4.21.1
jsonschema-specifications 2023.12.1
jupyter 1.0.0
-jupyter_client 7.4.9
+jupyter_client 8.6.1
jupyter-console 6.6.3
jupyter_core 5.7.2
jupyter-events 0.10.0
+jupyter-lsp 2.2.4
jupyter_server 2.13.0
jupyter_server_terminals 0.5.3
+jupyterlab 4.1.5
jupyterlab_pygments 0.3.0
-jupyterlab_server 2.22.0
+jupyterlab_server 2.22.1
jupyterlab_widgets 3.0.10
MarkupSafe 2.1.5
matplotlib-inline 0.1.6
mistune 3.0.2
more-itertools 10.2.0
-nbclassic 1.0.0
nbclient 0.10.0
nbconvert 7.16.3
nbformat 5.10.3
nest-asyncio 1.6.0
-notebook 6.5.6
+notebook 7.1.2
notebook_shim 0.2.4
overrides 7.7.0
packaging 24.0
@@ -83,7 +86,7 @@
python-dateutil 2.9.0.post0
python-json-logger 2.0.7
PyYAML 6.0.1
-pyzmq 24.0.1
+pyzmq 25.1.2
qtconsole 5.5.1
QtPy 2.4.1
referencing 0.34.0
How is that possible?
Aha. It's because later versions of notebook
require jupyterlab_server>=2.22.1
, so if jupyterlab_server==2.22.0
, pip will resolve the older versions of notebook.
404 GET /lab/api/settings/@jupyter-notebook/application-extension:shell?1687798647746 (::1): Schema not found: C:/Users/lenovo/AppData/Roaming/Python/share/jupyter/lab/schemas\@jupyter-notebook/application-extension\shell.json [W 2023-06-27 00:57:27.756 LabApp] wrote error: 'Schema not found: C:/Users/lenovo/AppData/Roaming/Python/share/jupyter/lab/schemas\@jupyter-notebook/application-extension\shell.json' Traceback (most recent call last): File "D:\anaconda3\lib\site-packages\tornado\web.py", line 1711, in _execute result = method(*self.path_args, *self.path_kwargs) File "D:\anaconda3\lib\site-packages\tornado\web.py", line 3208, in wrapper return method(self, args, **kwargs) File "C:\Users\lenovo\AppData\Roaming\Python\Python310\site-packages\jupyterlab_server\settings_handler.py", line 48, in get result, warnings = get_settings( File "C:\Users\lenovo\AppData\Roaming\Python\Python310\site-packages\jupyterlab_server\settings_utils.py", line 370, in get_settings schema, version = _get_schema(schemas_dir, schema_name, overrides, labextensions_path) File "C:\Users\lenovo\AppData\Roaming\Python\Python310\site-packages\jupyterlab_server\settings_utils.py", line 47, in _get_schema raise web.HTTPError(404, notfound_error % path) tornado.web.HTTPError: HTTP 404: Not Found (Schema not found: C:/Users/lenovo/AppData/Roaming/Python/share/jupyter/lab/schemas\@jupyter-notebook/application-extension\shell.json) [W 2023-06-27 00:57:27.762 LabApp] 404 GET /lab/api/settings/@jupyter-notebook/application-extension:shell?1687798647746 (298c5db38adf4e708fbe9e62b888a982@::1) 12.96ms referer=http://localhost:8888/tree