jupyter
jupyter copied to clipboard
latest Jupyter : REST API error: 404, "Not found"
Hi, First, thanks a lot for this very nice package which I had working out of the box with my previous anaconda distribution. I recently decided to switch from conda to mamba and use the conda-forge channel. There I got a more recent version of jupyter which fails with the following error from the messages buffer
Launching notebook process on port 8888...done
progn: Jupyter REST API error: 404, "Not found"
I'm running emacs from the master
branch with native-comp
and pgtk
.
My emacs-jupyter config looks like this
(use-package simple-httpd)
(use-package jupyter
:straight t
:config
(org-babel-do-load-languages 'org-babel-load-languages
(append org-babel-load-languages
'((jupyter . t))))
(setq jupyter-use-zmq nil)
(org-babel-jupyter-override-src-block "python")
)
And these are the results from jupyter --version
in the working and failing cases
| package | working | failing |
|----------------+---------+---------|
| IPython | 8.15.0 | 8.16.1 |
| ipykernel | 6.25.0 | 6.25.2 |
| ipywidgets | 8.0.4 | 8.1.1 |
| jupyter_client | 7.4.9 | 8.4.0 |
| jupyter_core | 5.3.0 | 5.4.0 |
| jupyter_server | 1.23.4 | 2.7.3 |
| jupyterlab | 3.6.3 | 4.0.7 |
| nbclient | 0.5.13 | 0.8.0 |
| nbconvert | 6.5.4 | 7.9.2 |
| nbformat | 5.9.2 | 5.9.2 |
| notebook | 6.5.4 | 7.0.5 |
| qtconsole | 5.4.2 | 5.4.4 |
| traitlets | 5.7.1 | 5.11.2 |
Also I could not use zmq
as emacs just crashes when I try to install it, not even use it (maybe native-comp
related issue).
I could try to target another jupyter/ipython/ipykernel version but I'm not very knowledgeable about all the jupyter intricacies so I'd probably need a lot of attempts. Would you have any idea which package I should downgrade? Or maybe you're aware of what can be fixed on the emacs-jupyter side.
UPDATE
downgrading jupyter_server
with mamba install jupyter_server=1.23.4
fixed the issue, with sometimes a timeout error when launching the kernel. I now get this from jupyter --version
IPython : 8.16.1
ipykernel : 6.25.2
ipywidgets : 8.1.1
jupyter_client : 8.4.0
jupyter_core : 5.4.0
jupyter_server : 1.23.4
jupyterlab : 3.5.3
nbclient : 0.8.0
nbconvert : 7.9.2
nbformat : 5.9.2
notebook : 6.5.4
qtconsole : 5.4.4
traitlets : 5.9.0
wonder if this is the issue: https://github.com/jupyter-server/jupyter_server/pull/1047? Potential breaking change in jupter_server 2.x
Do you want to check this fix? https://github.com/emacs-jupyter/jupyter/issues/542#issuecomment-2210783148
That fix has to do with the fact that jupyter_server
conditionally adds a login
endpoint depending on if the server uses authentication or not. It seems that Emacs-Jupyter should not try to login in cases where no authentication is needed. I guess if the xsrf cookie is already available without logging in or something like that.