notebook: Missing or misshapen translation settings schema
I am getting an error when launching jupyter. I uninstalled everything including python (with brew) and still not solving the issue.
The folder /opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/share/
doesn’t contain the jupyter
folder.
[I 2023-07-20 23:41:40.032 ServerApp] Package notebook took 0.0000s to import
[I 2023-07-20 23:41:40.034 ServerApp] notebook | extension was successfully linked.
[I 2023-07-20 23:41:40.077 ServerApp] notebook | extension was successfully loaded.
[I 2023-07-20 23:41:40.078 ServerApp] Serving notebooks from local directory: /Users/<>/dev
[I 2023-07-20 23:41:40.078 ServerApp] Jupyter Server 2.7.0 is running at:
[I 2023-07-20 23:41:40.078 ServerApp] http://localhost:8888/tree?token=f9035f29fdb2ce27b7c4664295b20b6ad5aa3315937fecc5
[I 2023-07-20 23:41:40.078 ServerApp] http://127.0.0.1:8888/tree?token=f9035f29fdb2ce27b7c4664295b20b6ad5aa3315937fecc5
[I 2023-07-20 23:41:40.078 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-07-20 23:41:40.086 ServerApp]
To access the server, open this file in a browser:
file:///Users/<>/Library/Jupyter/runtime/jpserver-6423-open.html
Or copy and paste one of these URLs:
http://localhost:8888/tree?token=f9035f29fdb2ce27b7c4664295b20b6ad5aa3315937fecc5
http://127.0.0.1:8888/tree?token=f9035f29fdb2ce27b7c4664295b20b6ad5aa3315937fecc5
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[W 2023-07-20 23:41:42.105 JupyterNotebookApp] Missing or misshapen translation settings schema:
HTTP 404: Not Found (Schema not found: /opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/share/jupyter/lab/schemas/@jupyterlab/translation-extension/plugin.json)
[W 2023-07-20 23:41:42.106 JupyterNotebookApp] Settings directory does not exist at /opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/share/jupyter/lab/schemas
[W 2023-07-20 23:41:42.146 JupyterNotebookApp] Missing or misshapen translation settings schema:
HTTP 404: Not Found (Schema not found: /opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/share/jupyter/lab/schemas/@jupyterlab/translation-extension/plugin.json)
[W 2023-07-20 23:41:42.146 ServerApp] 404 GET /lab/api/settings/@jupyter-notebook/application-extension:shell?1689910902143 (::1): Schema not found: /opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json
[W 2023-07-20 23:41:42.146 JupyterNotebookApp] wrote error: 'Schema not found: /opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json'
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/tornado/web.py", line 1784, in _execute
result = method(*self.path_args, **self.path_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/tornado/web.py", line 3290, in wrapper
return method(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/jupyterlab_server/settings_handler.py", line 48, in get
result, warnings = get_settings(
^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/jupyterlab_server/settings_utils.py", line 370, in get_settings
schema, version = _get_schema(schemas_dir, schema_name, overrides, labextensions_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/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: /opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json)
[W 2023-07-20 23:41:42.149 JupyterNotebookApp] 404 GET /lab/api/settings/@jupyter-notebook/application-extension:shell?1689910902143 (7f80a9c368014c73b2be2492888a488c@::1) 3.94ms referer=http://localhost:8888/tree
Here the lib I am ussing:
ipykernel==6.24.0
notebook==7.0.0
notebook_shim==0.2.3
Python 3.11.4
Jupyter lab would work using
jupyter lab --app-dir /opt/homebrew/share/jupyter/lab
How do I change the path to run jupyter notebook
?
Thank you
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 4
- Comments: 69 (10 by maintainers)
I’m also having this issue on MacOS 12.3. “Missing or misshapen translation settings schema” and “Schema not found: /opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json”
This helped:
Thanks to defjaf in this thread 😃
TL;DR: Quick fix by making a symlink from where Jupyter is looking to where the files actually are:
(Keep in mind your python version might differ so check the Jupyter error output for your version)
I have a fresh apple silicon machine with the latest OS updates. First brew installed python3. Then
pip3 install jupyterlab notebook voila
.jupyter notebook
with or without the PATH env vars just gives this blank screen:As was said earlier the meat of this problem is for whatever reason jupyter notebook is looking for the files here:
/opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/share/jupyter/
whereas the files in this installation are located:/opt/homebrew/share/jupyter/
So I symlinked:
ln -s /opt/homebrew/share/jupyter/ /opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/share/jupyter
and now things are happy (until I upgrade python at least).
Full “stacktrace” below:
2 working solutions:
The first is to export the following:
The second is to simply install an earlier version:
python3 -m pip install "notebook<7"
So far the easiest fix is from @njo creating a symlink to the missing folder shown in the error message.
If you look at one of the errors, for example:
[W 2023-11-21 11:19:38.902 JupyterNotebookApp] Missing or misshapen translation settings schema: HTTP 404: Not Found (Schema not found: /opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/share/jupyter/lab/schemas/@jupyterlab/translation-extension/plugin.json)
It is complaining that the specified file is not found in target location. When I checked, that’s right, there is no jupyter folder inside …share/ folder. So I created a symlink named jupyter from /opt/homebrew/share/jupyter using the command,
ln -s /opt/homebrew/share/jupyter /opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/share/jupyter
Try running the jupyter notebook command again.
This also ensures that you are using homebrew’s installed version.
My experience replicating this issue was as follows:
I installed Python 3.11 with homebrew and then the Notebook package with
pip
. In this case, Notebook 6.5 worked well.With Notebook 7.0.1 Same behavior with and without environment variables:
jupyter notebook
jupyter lab
Indeed, Jupyterlab works well using
jupyter lab --app-dir /opt/homebrew/share/jupyter/lab
, but I could not get a working version of Notebook 7I have only encountered this issue with when using the python/pip installed with homebrew. All my installs of Notebook 7 with conda environments work well. This is not my regular workflow, I usually use conda environments, so I am not sure yet what could be the problem.
I’m also having this issue on MacOS 13.5. m1. with 404 errors. And python 3.11. brew installed,
jupyter, notebook
that were downloaded bypip3
this works for me too!
thanks a lot @Stamaks
I had the same issue and I solved it by updating brew and reinstalling jupyter notebook using brew. What I exactly did is that :
brew update && brew doctor && brew install jupyter
@stgreenman (et al):
I don’t use (Ana)conda, but this should work.
However, if you just want to stick with homebrew, you should just be able to add the following to your .bashrc (or equivalent for other shells):
Alternately, you can also just create (and activate) a venv with homebrew python, and that should work as well (with no extra configuration).
(For clarity: setting the environment variables seems to fix the UI issues in notebook, but the schema console messages still appear on my configuration. Using a venv seems to fix the UI issues and the schema messages.)
A further possibly useful bit of info:
On my setup, Python 3.11 is installed by homebrew, but all packages, including jupyter, notebook, etc. are installed with pip.
cc @andrii-i @RRosio @ericsnekbytes @echarles @afshin
If one of you has a Mac and would be able to look into this that would be great, thanks 🙏
thanks to @avioligo I finally resolved this problem by :
then run $ jupyter --version, which shows: notebook : 7.0.6
notebook will be replaced to version 6.5.6, and version 7.0.6 is auto deleted.
everything is ok!
Try this :
jupyter lab build
Other solution without exports:
Having the same issue. Brew install python3.11, pip install notebook leads to a logo only page with javascript errors for missing files (such as tracker.json). Running jupyter lab build fixed the issue for me
its worked for me.
I had my Python installed VIA Homebrew (macOS) and i’ve installed jupyter lab VIA pip3 (pip3 install jupyterlab) but it shows that jupyter lab still comes from homebrew regardless
When i ran jupyter lab (by typing “jupyter lab” in terminal) i got these error logs
what worked for me was this “build” command that was printed in the error logs (PS: you need Node 18<=, i used NVM)
I saw these logs while the build command ran,
i also added these configs to my .zshrc file although i am not sure if it was significant
Hope this helps 💯 🍷 🗿
Thank you! This is my resulting build after running your commands:
jupyter notebook
is now running properly.Do note that you’ll want to remove these env variables if you already set them or else you won’t be able to create new notebooks (at least this was in my case):
I wanted to note here that I am also taking a look at this issue but haven’t been able to identify what would fix it. I read on the Homebrew page that for Apple Silicon Macs Homebrew is installed in
/opt/homebrew
, where as for Intel Macs Homebrew is installed in/usr/local
, and that this might affect where the packages get installed too. So in terms of replicating this issue in the CI, I am trying to get Homebrew installed in the/opt/homebrew
directory in #7006 but I haven’t been successful (please excuse the mess of commands there).I am also trying to troubleshoot locally since I have an M1 but I am thinking if maybe it is a matter of updating how the
jupyter --paths
are grabbed, at least for the M1? As a short term solution I had tried simply copying thejupyter
folder to the expected location and it solved the issue in JupyterLab and Notebook, not however for NbClassic (I was looking at this and thought that maybe that was due to a separate but related issue? I will dig a bit more and post in the NbClassic issue what I find).I’m seeing the same problem after installing. Python is installed with homebrew and jupyter with pip. On MacOS 12.3.1.
I’m seeing:
and
/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/share/jupyter/
does not seem to exist.
– Workaround – I had the same issue on Mac. Was able to get notebook GUI showing by running notebooks through Anaconda:
source ~/.bashrc
orsource ~/.zshrc
depending on which shell you useconda activate
. Terminal should show ‘(base)’ prefix. Exit withconda deactivate
jupyter notebook
afterconda activate
. GUI should now appear.*Note - I don’t think you need to uninstall Homebrew’s python or notebook libraries since Anaconda runs its own instance of python and notebook libraries in a separate directory from Homebrew’s.
Two cents here:
I was having this same problem with both Jupyter notebook and jupyter lab and I solved it with a
jupyter lab install
I had similar issue . Check possible conflicts with
brew doctor
and runbrew link --overwrite jupyterlab
if necessaryUpdate: this works, but you need to run
jupyter lab build
beforehand. Thanks for the workaround!So, now that this (and the related jupyterlab and nbclassic issues) have been sitting here for a while, do we have a picture of whether this is deemed a proper, fixable (and fix-worthy) bug? If so, do we understand whether it’s likely on the jupyter-* side, or is it possibly actually a homebrew issue? (I haven’t reported it over there, and I don’t think anyone else has either — although see this list of supposedly closed issues — but perhaps I or someone should?)
(I completely understand that we are discussing voluntary open-source contributions here, so timelines can be long, and that a perfectly acceptable response is: if this bothers you, fix it yourself! Although some pointers for where to look in the code-base would be great…)
Could this be similar to https://github.com/jupyter/notebook/issues/6952, which would happen when updating
notebook
in an existing environment?I tried creating a new environment, installing
notebook==7.0.0
, thenpip install -U notebook
to grab 7.0.1 but everything went fine and couldn’t reproduce the issue.Would you be able to try install
notebook==7.0.1
in a clean environment just to make sure it loads properly?Further to my previous partial fix using
JUPYTER_PATH
andJUPYTER_CONFIG_PATH
I note that in fact
jupyter lab
behaves better with those environment variables set as above: without them, it does not seem to correctly recognise extensions. (To be precise,app-dir
does not solve these problems.) So I wonder if we need to make this a broader issue?In detail: without the variables set, the “Installed” list is empty and, for example, there is no sidebar entry for ipyparallel even when installed:
When run with those variables set, I get:
I note that
is a partial fix: it still gives error messages in the terminal, but the interface issues mentioned above seem to be better.
So it is possible that this is an issue of “miscommunication” between the homebrew build and jupyter?
same issue here, notebook version 6.5.4 had no issue.
❯ jupyter --version Selected Jupyter core packages… IPython : 8.14.0 ipykernel : 6.24.0 ipywidgets : 8.0.7 jupyter_client : 8.3.0 jupyter_core : 5.3.1 jupyter_server : 2.7.0 jupyterlab : 4.0.3 nbclient : 0.8.0 nbconvert : 7.7.2 nbformat : 5.9.1 notebook : 7.0.0 qtconsole : 5.4.3 traitlets : 5.9.0
Thanks @taktikal17 for reporting the issue 👍
Just to confirm: does JupyterLab work without specifying the
--app-dir
option?