Closed nakkaya closed 2 years ago
I get
error in process sentinel: if: Api 1 unsupported error in process sentinel: Api 1 unsupported
Jupyter lab version 3.1.4 (dev), 3.0.16 (app)
It seems that ein
is picking jupyter_server
version (1.11.1
as of now) as the notebook/kernel api version. This gives ein
the impression that the api version is lower than 2 and since versions lower than 1 are not supported it fails with that error. The jupyter
messaging api however is substantially unchanged:
https://jupyter-client.readthedocs.io/en/stable/messaging.html
If you change this line:
to
:api-version 5
it should work as a workaround.
It's actually calling <URL>/api
which return something like {"version": "6.4.4"}
to get the version
https://github.com/millejoh/emacs-ipython-notebook/blob/0600c286bd7b0812f4908d7df1be279b6b65923f/lisp/ein-query.el#L166-L172
This version is not accurate, the better way is to call <URL>/api/spec.yaml
which return a yaml spec like below:
swagger: '2.0'
info:
title: Jupyter Notebook API
description: Notebook API
version: "5"
contact:
name: Jupyter Project
url: https://jupyter.org
# will be prefixed to all paths
basePath: /
produces:
- application/json
consumes:
- application/json
parameters:
...
And we can see version: "5"
which is the real api version
Damn, @martin-liu is dropping truth bombs.
I tested d17c443 against a server instantiated via jupyter lab
and it did not fail immediately.
@dickmao Wow, thanks for quick action!
But I tried several different Jupyter lab versions and some of them have different description (from jupyter-server
) which will fail the regexp check.
Created a simple PR https://github.com/millejoh/emacs-ipython-notebook/pull/811 to fix that, can you have a check?
In issue #783 there was talk of
lab
not working withein
however I used to have a docker container runningjupyter lab
that I could connect to usingein
without any issues. The other day I rebuilt the container which installed the latest version ofjupyter
3.X
that is causing theapi error
. I am guessing this is not related to runninglab
ornotebook
but new version has changed the api.