emacs-jupyter / jupyter

An interface to communicate with Jupyter kernels.
GNU General Public License v3.0
914 stars 89 forks source link

latest Jupyter : REST API error: 404, "Not found" #500

Open leclairm opened 9 months ago

leclairm commented 9 months ago

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.

leclairm commented 9 months ago

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
danielpopescu commented 2 weeks ago

wonder if this is the issue: https://github.com/jupyter-server/jupyter_server/pull/1047? Potential breaking change in jupter_server 2.x