Closed simonpintarelli closed 3 years ago
I'd need to see the results of:
M-x ein:dev-start-debug
M-x ein:dev-bug-report-template
and copy output here.Sorry, I missed that there is a ein:dev-start-debug
command. It was not related to remote kernels. But unfortunately connecting to a running jupyterlab session stopped working (error: Api 1 unsupported). Since the jupyter lab (vs notebook) is a bit more convenient to use when switching between org mode and traditional jupyter accessed in the web browser.
Here is the traceback:
ob-ein complains about Api 1 not supported. Jupyter as juypterlab, it works when using jupyter notebook
instead of jupyter lab
.
Try to execute a ob-ein code block when :session
is set to a kernel running jupyter lab.
("EIN system info"
:emacs-version
"GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22, cairo version 1.17.3)
of 2020-08-28"
:window-system x
:emacs-variant "spacemacs0.300.0"
:build
"--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-wide-int --with-modules --with-cairo --with-harfbuzz 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
:os
(:uname
"Linux 5.10.15-arch1-1 #1 SMP PREEMPT Wed, 10 Feb 2021 18:32:40 +0000 x86_64 GNU/Linux
"
:lsb-release nil)
:jupyter
"jupyter core : 4.6.3
jupyter-notebook : 6.2.0
qtconsole : 5.0.1
ipython : 7.19.0
ipykernel : 5.4.2
jupyter client : 6.1.7
jupyter lab : 3.0.7
nbconvert : 6.0.7
ipywidgets : 7.6.2
nbformat : 5.0.8
traitlets : 5.0.5
"
:image-types
(svg png gif tiff jpeg xpm xbm pbm)
:image-types-available
(svg png gif tiff jpeg xpm xbm pbm)
:request-backend curl
:ein
(:version "20210211.1542"
:source-dir "/home/simon/.emacs.d/elpa/27.1/develop/ein-20210211.1542/")
:lib
((:name "websocket"
:path "~/.emacs.d/elpa/27.1/develop/websocket-20210110.17/websocket.elc"
:featurep t
:version-var websocket-version
:version "1.12")
(:name "anaphora"
:path "~/.emacs.d/elpa/27.1/develop/anaphora-20180618.2200/anaphora.elc"
:featurep t
:version-var nil
:version nil)
(:name "request"
:path "~/.emacs.d/elpa/27.1/develop/request-20210214.37/request.elc"
:featurep t
:version-var request-version
:version "0.3.3")
(:name "deferred"
:path "~/.emacs.d/elpa/27.1/develop/deferred-20170901.1330/deferred.elc"
:featurep t
:version-var deferred:version
:version "0.5.0")
(:name "polymode"
:path "~/.emacs.d/elpa/27.1/develop/polymode-20200606.1106/polymode.elc"
:featurep t
:version-var nil
:version nil)
(:name "dash"
:path "~/.emacs.d/elpa/27.1/develop/dash-20210210.1427/dash.elc"
:featurep t
:version-var nil
:version nil)
(:name "with-editor"
:path "~/.emacs.d/elpa/27.1/develop/with-editor-20210117.2008/with-editor.elc"
:featurep t
:version-var nil
:version nil)))
[debug] request--curl: curl --silent --location --cookie /home/simon/.emacs.d/.cache/request/curl-cookie-jar --cookie-jar /home/simon/.emacs.d/.cache/request/curl-cookie-jar --include --write-out \n(:num-redirects %{num_redirects} :url-effective "%{url_effective}") --trace-ascii /tmp/curl-trace --compressed --header User-Agent: Mozilla/5.0 --header X-XSRFTOKEN: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 http://127.0.0.100:18888/login
[debug] request--curl-callback: event finished
[debug] request--callback: UNPARSED
HTTP/1.1 200 OK
Server: TornadoServer/6.1
Content-Type: text/html; charset=UTF-8
Date: Tue, 16 Feb 2021 10:35:25 GMT
Content-Security-Policy: frame-ancestors 'self'; report-uri /api/security/csp-report
Etag: "40434bf86083cf045aab08f1817d3d42844cb370"
Content-Length: 3035
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>JupyterLab</title><meta name="viewport" content="width=device-width,initial-scale=1"> <script id="jupyter-config-data" type="application/json">{"appName": "JupyterLab", "appNamespace": "lab", "appSettingsDir": "/usr/share/jupyter/lab/settings", "appUrl": "/lab", "appVersion": "3.0.7", "baseUrl": "/", "buildAvailable": true, "buildCheck": true, "cacheFiles": false, "devMode": false, "disabledExtensions": [], "exposeAppInBrowser": false, "extraLabextensionsPath": [], "federated_extensions": [], "fullAppUrl": "/lab", "fullLabextensionsUrl": "/lab/extensions", "fullListingsUrl": "/lab/api/listings", "fullMathjaxUrl": "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js", "fullSettingsUrl": "/lab/api/settings", "fullStaticUrl": "/static/lab", "fullThemesUrl": "/lab/api/themes", "fullTranslationsApiUrl": "/lab/api/translations", "fullTreeUrl": "/lab/tree", "fullWorkspacesApiUrl": "/lab/api/workspaces", "ignorePlugins": [], "labextensionsPath": ["/home/simon/.local/share/jupyter/labextensions", "/usr/local/share/jupyter/labextensions", "/usr/share/jupyter/labextensions"], "labextensionsUrl": "/lab/extensions", "listingsUrl": "/lab/api/listings", "mathjaxConfig": "TeX-AMS_HTML-full,Safe", "mode": "multiple-document", "notebookVersion": "[1, 3, 0, \"\"]", "quitButton": true, "schemasDir": "/usr/share/jupyter/lab/schemas", "serverRoot": "~/ob-ein-debug", "settingsUrl": "/lab/api/settings", "staticDir": "/usr/share/jupyter/lab/static", "store_id": 9, "templatesDir": "/usr/share/jupyter/lab/static", "terminalsAvailable": true, "themesDir": "/usr/share/jupyter/lab/themes", "themesUrl": "/lab/api/themes", "token": "", "translationsApiUrl": "/lab/api/translations", "treePath": "", "treeUrl": "/lab/tree", "userSettingsDir": "/home/simon/.jupyter/lab/user-settings", "workspace": "default", "workspacesApiUrl": "/lab/api/workspaces", "workspacesDir": "/home/simon/.jupyter/lab/workspaces", "wsUrl": ""}</script><link rel="icon" type="image/x-icon" href="/static/favicons/favicon.ico" class="idle favicon"><link rel="" type="image/x-icon" href="/static/favicons/favicon-busy-1.ico" class="busy favicon"><script defer="defer" src="/static/lab/main.fe909ec527ecafbacef2.js"></script></head><body><script>/* Remove token from URL. */
(function () {
var location = window.location;
var search = location.search;
// If there is no query string, bail.
if (search.length <= 1) {
return;
}
// Rebuild the query string without the `token`.
var query = '?' + search.slice(1).split('&')
.filter(function (param) { return param.split('=')[0] !== 'token'; })
.join('&');
// Rebuild the URL with the new query string.
var url = location.origin + location.pathname +
(query !== '?' ? query : '') + location.hash;
if (url === location.href) {
return;
}
window.history.replaceState({ }, '', url);
})();</script></body></html>
[debug] request--callback: PARSED
(:bad-page nil)
[debug] request--callback: executing success
[debug] request--curl: curl --silent --location --cookie /home/simon/.emacs.d/.cache/request/curl-cookie-jar --cookie-jar /home/simon/.emacs.d/.cache/request/curl-cookie-jar --include --write-out \n(:num-redirects %{num_redirects} :url-effective "%{url_effective}") --trace-ascii /tmp/curl-trace --compressed --header User-Agent: Mozilla/5.0 --header X-XSRFTOKEN: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 http://127.0.0.100:18888/api
[debug] request--callback: executing complete
[debug] request--curl-callback: event finished
[debug] request--callback: UNPARSED
HTTP/1.1 200 OK
Server: TornadoServer/6.1
Content-Type: application/json
Date: Tue, 16 Feb 2021 10:35:25 GMT
Content-Security-Policy: frame-ancestors 'self'; report-uri /api/security/csp-report; default-src 'none'
Etag: "d7fdb722c9f4d99fa856331148e3e2810a5d81b6"
Content-Length: 20
{"version": "1.3.0"}
[debug] request--callback: PARSED
(:version 1.3.0)
[debug] request--callback: executing complete
[debug] request--curl: curl --silent --location --cookie /home/simon/.emacs.d/.cache/request/curl-cookie-jar --cookie-jar /home/simon/.emacs.d/.cache/request/curl-cookie-jar --include --write-out \n(:num-redirects %{num_redirects} :url-effective "%{url_effective}") --trace-ascii /tmp/curl-trace --compressed --request GET --header User-Agent: Mozilla/5.0 --header X-XSRFTOKEN: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 http://127.0.0.100:18888/api/kernelspecs
[debug] request--curl-callback: event finished
[debug] request--callback: UNPARSED
HTTP/1.1 200 OK
Server: TornadoServer/6.1
Content-Type: application/json
Date: Tue, 16 Feb 2021 10:35:25 GMT
Content-Security-Policy: frame-ancestors 'self'; report-uri /api/security/csp-report; default-src 'none'
Etag: "fbfb296d71b04110f5b3d83e1d622917767bf86c"
Content-Length: 1140
{"default": "python3", "kernelspecs": {"julia-0.6": {"name": "julia-0.6", "spec": {"argv": ["/usr/bin/julia", "-i", "--startup-file=yes", "--color=yes", "/home/simon/.julia/v0.6/IJulia/src/kernel.jl", "{connection_file}"], "env": {}, "display_name": "Julia 0.6.2", "language": "julia", "interrupt_mode": "signal", "metadata": {}}, "resources": {"logo-64x64": "/kernelspecs/julia-0.6/logo-64x64.png", "logo-32x32": "/kernelspecs/julia-0.6/logo-32x32.png"}}, "ir": {"name": "ir", "spec": {"argv": ["/usr/lib64/R/bin/R", "--slave", "-e", "IRkernel::main()", "--args", "{connection_file}"], "env": {}, "display_name": "R", "language": "R", "interrupt_mode": "signal", "metadata": {}}, "resources": {"kernel.js": "/kernelspecs/ir/kernel.js", "logo-64x64": "/kernelspecs/ir/logo-64x64.png"}}, "python3": {"name": "python3", "spec": {"argv": ["/usr/bin/python3", "-m", "ipykernel_launcher", "-f", "{connection_file}"], "env": {}, "display_name": "Python 3", "language": "python", "interrupt_mode": "signal", "metadata": {}}, "resources": {"logo-64x64": "/kernelspecs/python3/logo-64x64.png", "logo-32x32": "/kernelspecs/python3/logo-32x32.png"}}}}
[debug] request--callback: PARSED
(:default python3 :kernelspecs (:julia-0.6 (:name julia-0.6 :spec (:argv [/usr/bin/julia -i --startup-file=yes --color=yes /home/simon/.julia/v0.6/IJulia/src/kernel.jl {connection_file}] :env nil :display_name Julia 0.6.2 :language julia :interrupt_mode signal :metadata nil) :resources (:logo-64x64 /kernelspecs/julia-0.6/logo-64x64.png :logo-32x32 /kernelspecs/julia-0.6/logo-32x32.png)) :ir (:name ir :spec (:argv [/usr/lib64/R/bin/R --slave -e IRkernel::main() --args {connection_file}] :env nil :display_name R :language R :interrupt_mode signal :metadata nil) :resources (:kernel.js /kernelspecs/ir/kernel.js :logo-64x64 /kernelspecs/ir/logo-64x64.png)) :python3 (:name python3 :spec (:argv [/usr/bin/python3 -m ipykernel_launcher -f {connection_file}] :env nil :display_name Python 3 :language python :interrupt_mode signal :metadata nil) :resources (:logo-64x64 /kernelspecs/python3/logo-64x64.png :logo-32x32 /kernelspecs/python3/logo-32x32.png))))
[debug] request--callback: executing success
[debug] request--curl: curl --silent --location --cookie /home/simon/.emacs.d/.cache/request/curl-cookie-jar --cookie-jar /home/simon/.emacs.d/.cache/request/curl-cookie-jar --include --write-out \n(:num-redirects %{num_redirects} :url-effective "%{url_effective}") --trace-ascii /tmp/curl-trace --compressed --request GET --header User-Agent: Mozilla/5.0 --header X-XSRFTOKEN: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 http://127.0.0.100:18888/api/contents
[debug] request--callback: executing complete
[debug] request--curl: curl --silent --location --cookie /home/simon/.emacs.d/.cache/request/curl-cookie-jar --cookie-jar /home/simon/.emacs.d/.cache/request/curl-cookie-jar --include --write-out \n(:num-redirects %{num_redirects} :url-effective "%{url_effective}") --trace-ascii /tmp/curl-trace --compressed --request GET --header User-Agent: Mozilla/5.0 --header X-XSRFTOKEN: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 http://127.0.0.100:18888/api/sessions
[debug] request--curl-callback: event finished
[debug] request--callback: UNPARSED
HTTP/1.1 200 OK
Server: TornadoServer/6.1
Content-Type: application/json
Date: Tue, 16 Feb 2021 10:35:25 GMT
Content-Security-Policy: frame-ancestors 'self'; report-uri /api/security/csp-report; default-src 'none'
Last-Modified: Tue, 16 Feb 2021 10:32:52 GMT
Etag: "f35f672a503f0e302052dff46c17236daa25dc24"
Content-Length: 461
{"name": "", "path": "", "last_modified": "2021-02-16T10:32:52.890138Z", "created": "2021-02-16T10:32:52.890138Z", "content": [{"name": "Untitled.ipynb", "path": "Untitled.ipynb", "last_modified": "2021-02-16T10:32:52.886804Z", "created": "2021-02-16T10:32:52.886804Z", "content": null, "format": null, "mimetype": null, "size": 72, "writable": true, "type": "notebook"}], "format": "json", "mimetype": null, "size": null, "writable": true, "type": "directory"}
[debug] request--callback: PARSED
(:name :path :last_modified 2021-02-16T10:32:52.890138Z :created 2021-02-16T10:32:52.890138Z :content [(:name Untitled.ipynb :path Untitled.ipynb :last_modified 2021-02-16T10:32:52.886804Z :created 2021-02-16T10:32:52.886804Z :content nil :format nil :mimetype nil :size 72 :writable t :type notebook)] :format json :mimetype nil :size nil :writable t :type directory)
[debug] request--callback: executing success
[debug] request--curl: curl --silent --location --cookie /home/simon/.emacs.d/.cache/request/curl-cookie-jar --cookie-jar /home/simon/.emacs.d/.cache/request/curl-cookie-jar --include --write-out \n(:num-redirects %{num_redirects} :url-effective "%{url_effective}") --trace-ascii /tmp/curl-trace --compressed --request GET --header User-Agent: Mozilla/5.0 --header X-XSRFTOKEN: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 http://127.0.0.100:18888/api/contents/foobar.ipynb
[debug] request--curl: curl --silent --location --cookie /home/simon/.emacs.d/.cache/request/curl-cookie-jar --cookie-jar /home/simon/.emacs.d/.cache/request/curl-cookie-jar --include --write-out \n(:num-redirects %{num_redirects} :url-effective "%{url_effective}") --trace-ascii /tmp/curl-trace --compressed --request GET --header User-Agent: Mozilla/5.0 --header X-XSRFTOKEN: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 http://127.0.0.100:18888/api/sessions
[debug] request--callback: executing complete
[debug] request--curl-callback: event finished
[debug] request--callback: UNPARSED
HTTP/1.1 200 OK
Server: TornadoServer/6.1
Content-Type: application/json
Date: Tue, 16 Feb 2021 10:35:25 GMT
Content-Security-Policy: frame-ancestors 'self'; report-uri /api/security/csp-report; default-src 'none'
Etag: "97d170e1550eee4afc0af065b78cda302a97674c"
Content-Length: 2
[]
[debug] request--callback: PARSED
[]
[debug] request--callback: executing success
[debug] request--curl: curl --silent --location --cookie /home/simon/.emacs.d/.cache/request/curl-cookie-jar --cookie-jar /home/simon/.emacs.d/.cache/request/curl-cookie-jar --include --write-out \n(:num-redirects %{num_redirects} :url-effective "%{url_effective}") --trace-ascii /tmp/curl-trace --compressed --request GET --header User-Agent: Mozilla/5.0 --header X-XSRFTOKEN: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 http://127.0.0.100:18888/api/contents
[debug] request--callback: executing complete
[debug] request--curl-callback: event finished
[debug] request--callback: UNPARSED
HTTP/1.1 200 OK
Server: TornadoServer/6.1
Content-Type: application/json
Date: Tue, 16 Feb 2021 10:35:25 GMT
Content-Security-Policy: frame-ancestors 'self'; report-uri /api/security/csp-report; default-src 'none'
Etag: "97d170e1550eee4afc0af065b78cda302a97674c"
Content-Length: 2
[]
[debug] request--callback: PARSED
[]
[debug] request--callback: executing success
[debug] request--callback: executing complete
[debug] request--curl-callback: event finished
[debug] request--callback: UNPARSED
HTTP/1.1 404 Not Found
Server: TornadoServer/6.1
Content-Type: application/json
Date: Tue, 16 Feb 2021 10:35:25 GMT
Content-Security-Policy: frame-ancestors 'self'; report-uri /api/security/csp-report; default-src 'none'
Content-Length: 70
{"message": "No such file or directory: foobar.ipynb", "reason": null}
[error] request--callback: peculiar error: 404
[debug] request--callback: executing error
[debug] request--curl: curl --silent --location --cookie /home/simon/.emacs.d/.cache/request/curl-cookie-jar --cookie-jar /home/simon/.emacs.d/.cache/request/curl-cookie-jar --include --write-out \n(:num-redirects %{num_redirects} :url-effective "%{url_effective}") --trace-ascii /tmp/curl-trace --compressed --data-binary @- --request POST --header Content-Type: application/json --header User-Agent: Mozilla/5.0 --header X-XSRFTOKEN: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 http://127.0.0.100:18888/api/contents
[debug] request--callback: executing complete
[debug] request--curl-callback: event finished
[debug] request--callback: UNPARSED
HTTP/1.1 200 OK
Server: TornadoServer/6.1
Content-Type: application/json
Date: Tue, 16 Feb 2021 10:35:25 GMT
Content-Security-Policy: frame-ancestors 'self'; report-uri /api/security/csp-report; default-src 'none'
Last-Modified: Tue, 16 Feb 2021 10:32:52 GMT
Etag: "f35f672a503f0e302052dff46c17236daa25dc24"
Content-Length: 461
{"name": "", "path": "", "last_modified": "2021-02-16T10:32:52.890138Z", "created": "2021-02-16T10:32:52.890138Z", "content": [{"name": "Untitled.ipynb", "path": "Untitled.ipynb", "last_modified": "2021-02-16T10:32:52.886804Z", "created": "2021-02-16T10:32:52.886804Z", "content": null, "format": null, "mimetype": null, "size": 72, "writable": true, "type": "notebook"}], "format": "json", "mimetype": null, "size": null, "writable": true, "type": "directory"}
[debug] request--callback: PARSED
(:name :path :last_modified 2021-02-16T10:32:52.890138Z :created 2021-02-16T10:32:52.890138Z :content [(:name Untitled.ipynb :path Untitled.ipynb :last_modified 2021-02-16T10:32:52.886804Z :created 2021-02-16T10:32:52.886804Z :content nil :format nil :mimetype nil :size 72 :writable t :type notebook)] :format json :mimetype nil :size nil :writable t :type directory)
[debug] request--callback: executing success
[debug] request--callback: executing complete
[debug] request--curl-callback: event finished
[debug] request--callback: UNPARSED
HTTP/1.1 201 Created
Server: TornadoServer/6.1
Content-Type: application/json
Date: Tue, 16 Feb 2021 10:35:25 GMT
Content-Security-Policy: frame-ancestors 'self'; report-uri /api/security/csp-report; default-src 'none'
Location: /api/contents/Untitled1.ipynb
Last-Modified: Tue, 16 Feb 2021 10:35:25 GMT
Content-Length: 245
{"name": "Untitled1.ipynb", "path": "Untitled1.ipynb", "last_modified": "2021-02-16T10:35:25.860642Z", "created": "2021-02-16T10:35:25.860642Z", "content": null, "format": null, "mimetype": null, "size": 72, "writable": true, "type": "notebook"}
[debug] request--callback: PARSED
(:name Untitled1.ipynb :path Untitled1.ipynb :last_modified 2021-02-16T10:35:25.860642Z :created 2021-02-16T10:35:25.860642Z :content nil :format nil :mimetype nil :size 72 :writable t :type notebook)
[debug] request--callback: executing success
[debug] request--curl: curl --silent --location --cookie /home/simon/.emacs.d/.cache/request/curl-cookie-jar --cookie-jar /home/simon/.emacs.d/.cache/request/curl-cookie-jar --include --write-out \n(:num-redirects %{num_redirects} :url-effective "%{url_effective}") --trace-ascii /tmp/curl-trace --compressed --request GET --header User-Agent: Mozilla/5.0 --header X-XSRFTOKEN: http://127.0.0.100:18888/api/contents/Untitled1.ipynb
[debug] request--curl: curl --silent --location --cookie /home/simon/.emacs.d/.cache/request/curl-cookie-jar --cookie-jar /home/simon/.emacs.d/.cache/request/curl-cookie-jar --include --write-out \n(:num-redirects %{num_redirects} :url-effective "%{url_effective}") --trace-ascii /tmp/curl-trace --compressed --request GET --header User-Agent: Mozilla/5.0 --header X-XSRFTOKEN: http://127.0.0.100:18888/api/contents
[debug] request--curl-callback: event finished
[debug] request--callback: UNPARSED
HTTP/1.1 200 OK
Server: TornadoServer/6.1
Content-Type: application/json
Date: Tue, 16 Feb 2021 10:35:25 GMT
Content-Security-Policy: frame-ancestors 'self'; report-uri /api/security/csp-report; default-src 'none'
Last-Modified: Tue, 16 Feb 2021 10:35:25 GMT
Etag: "92872f31bb7826fe421afb3248ccaf38852f3bbd"
Content-Length: 708
{"name": "", "path": "", "last_modified": "2021-02-16T10:35:25.860642Z", "created": "2021-02-16T10:35:25.860642Z", "content": [{"name": "Untitled1.ipynb", "path": "Untitled1.ipynb", "last_modified": "2021-02-16T10:35:25.860642Z", "created": "2021-02-16T10:35:25.860642Z", "content": null, "format": null, "mimetype": null, "size": 72, "writable": true, "type": "notebook"}, {"name": "Untitled.ipynb", "path": "Untitled.ipynb", "last_modified": "2021-02-16T10:32:52.886804Z", "created": "2021-02-16T10:32:52.886804Z", "content": null, "format": null, "mimetype": null, "size": 72, "writable": true, "type": "notebook"}], "format": "json", "mimetype": null, "size": null, "writable": true, "type": "directory"}
[debug] request--callback: PARSED
(:name :path :last_modified 2021-02-16T10:35:25.860642Z :created 2021-02-16T10:35:25.860642Z :content [(:name Untitled1.ipynb :path Untitled1.ipynb :last_modified 2021-02-16T10:35:25.860642Z :created 2021-02-16T10:35:25.860642Z :content nil :format nil :mimetype nil :size 72 :writable t :type notebook) (:name Untitled.ipynb :path Untitled.ipynb :last_modified 2021-02-16T10:32:52.886804Z :created 2021-02-16T10:32:52.886804Z :content nil :format nil :mimetype nil :size 72 :writable t :type notebook)] :format json :mimetype nil :size nil :writable t :type directory)
[debug] request--callback: executing success
[debug] request--curl: curl --silent --location --cookie /home/simon/.emacs.d/.cache/request/curl-cookie-jar --cookie-jar /home/simon/.emacs.d/.cache/request/curl-cookie-jar --include --write-out \n(:num-redirects %{num_redirects} :url-effective "%{url_effective}") --trace-ascii /tmp/curl-trace --compressed --request GET --header User-Agent: Mozilla/5.0 --header X-XSRFTOKEN: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 http://127.0.0.100:18888/api/sessions
[debug] request--callback: executing complete
[debug] request--curl-callback: event finished
[debug] request--callback: UNPARSED
HTTP/1.1 200 OK
Server: TornadoServer/6.1
Content-Type: application/json
Date: Tue, 16 Feb 2021 10:35:25 GMT
Content-Security-Policy: frame-ancestors 'self'; report-uri /api/security/csp-report; default-src 'none'
Last-Modified: Tue, 16 Feb 2021 10:35:25 GMT
Etag: "fdd4a1819465568784db067f90849f94f98659d7"
Content-Length: 308
{"name": "Untitled1.ipynb", "path": "Untitled1.ipynb", "last_modified": "2021-02-16T10:35:25.860642Z", "created": "2021-02-16T10:35:25.860642Z", "content": {"cells": [], "metadata": {}, "nbformat": 4, "nbformat_minor": 4}, "format": "json", "mimetype": null, "size": 72, "writable": true, "type": "notebook"}
[debug] request--callback: PARSED
(:name Untitled1.ipynb :path Untitled1.ipynb :last_modified 2021-02-16T10:35:25.860642Z :created 2021-02-16T10:35:25.860642Z :content (:cells [] :metadata nil :nbformat 4 :nbformat_minor 4) :format json :mimetype nil :size 72 :writable t :type notebook)
[debug] request--callback: executing success
[debug] request--curl-callback: event finished
[debug] request--callback: UNPARSED
HTTP/1.1 200 OK
Server: TornadoServer/6.1
Content-Type: application/json
Date: Tue, 16 Feb 2021 10:35:25 GMT
Content-Security-Policy: frame-ancestors 'self'; report-uri /api/security/csp-report; default-src 'none'
Etag: "97d170e1550eee4afc0af065b78cda302a97674c"
Content-Length: 2
[]
[debug] request--callback: PARSED
[]
[debug] request--callback: executing success
[debug] request--callback: executing complete
11:35:25:438: [debug] Login attempt #-1 in response to nil from http://127.0.0.100:18888. @#<buffer test.org>
11:35:25:438: [debug] EIN:QUERY-PREPARE-HEADER: Found xsrf: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 @#<buffer test.org>
11:35:25:454: [info] Login to http://127.0.0.100:18888 complete. @#<buffer test.org>
11:35:25:455: [debug] EIN:QUERY-PREPARE-HEADER: Found xsrf: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 @#<buffer test.org>
11:35:25:455: [debug] ein:notebooklist-login--complete STATUS: 200 DATA: (:bad-page nil) @#<buffer test.org>
11:35:25:461: [debug] ein:query-notebook-version--complete STATUS: 200 DATA: (:version 1.3.0) @#<buffer test.org>
11:35:25:462: [debug] EIN:QUERY-PREPARE-HEADER: Found xsrf: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 @#<buffer test.org>
11:35:25:471: [debug] EIN:QUERY-PREPARE-HEADER: Found xsrf: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 @#<buffer test.org>
11:35:25:472: [debug] ein:query-kernelspecs--complete STATUS: 200 DATA: (:default python3 :kernelspecs (:julia-0.6 (:name julia-0.6 :spec (:argv [/usr/bin/julia -i --startup-file=yes --color=yes /home/simon/.julia/v0.6/IJulia/src/kernel.jl {connection_file}] :env nil :display_name Julia 0.6.2 :language julia :interrupt_mode signal :metadata nil) :resources (:logo-64x64 /kernelspecs/julia-0.6/logo-64x64.png :logo-32x32 /kernelspecs/julia-0.6/logo-32x32.png)) :ir (:name ir :spec (:argv [/usr/lib64/R/bin/R --slave -e IRkernel::main() --args {connection_file}] :env nil :display_name R :language R :interrupt_mode signal :metadata nil) :resources (:kernel.js /kernelspecs/ir/kernel.js :logo-64x64 /kernelspecs/ir/logo-64x64.png)) :python3 (:name python3 :spec (:argv [/usr/bin/python3 -m ipykernel_launcher -f {connection_file}] :env nil :display_name Python 3 :language python :interrupt_mode signal :metadata nil) :resources (:logo-64x64 /kernelspecs/python3/logo-64x64.png :logo-32x32 /kernelspe @#<buffer test.org>
11:35:25:475: [debug] EIN:QUERY-PREPARE-HEADER: Found xsrf: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 @#<buffer test.org>
11:35:25:479: [verbose] Opening notebooklist at http://127.0.0.100:18888 @#<buffer test.org>
11:35:25:479: [debug] EIN:QUERY-PREPARE-HEADER: Found xsrf: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 @#<buffer *ein:notebooklist http://127.0.0.100:18888*>
11:35:25:480: [debug] EIN:QUERY-PREPARE-HEADER: Found xsrf: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 @#<buffer *ein:notebooklist http://127.0.0.100:18888*>
11:35:25:481: [debug] ein:query-contents--complete STATUS: 200 DATA: (:name :path :last_modified 2021-02-16T10:32:52.890138Z :created 2021-02-16T10:32:52.890138Z :content [(:name Untitled.ipynb :path Untitled.ipynb :last_modified 2021-02-16T10:32:52.886804Z :created 2021-02-16T10:32:52.886804Z :content nil :format nil :mimetype nil :size 72 :writable t :type notebook)] :format json :mimetype nil :size nil :writable t :type directory) @#<buffer test.org>
11:35:25:484: [debug] EIN:QUERY-PREPARE-HEADER: Found xsrf: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 @#<buffer test.org>
11:35:25:485: [debug] ein:query-sessions--complete STATUS: 200 DATA: [] @#<buffer test.org>
11:35:25:830: [debug] ein:query-sessions--complete STATUS: 200 DATA: [] @#<buffer test.org>
11:35:25:830: [error] ein:content-query-contents--error 404 No such file or directory: foobar.ipynb @#<buffer test.org>
11:35:25:831: [debug] EIN:QUERY-PREPARE-HEADER: Found xsrf: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 @#<buffer test.org>
11:35:25:832: [debug] ein:query-contents--complete STATUS: 404 DATA: (:message No such file or directory: foobar.ipynb :reason nil) @#<buffer test.org>
11:35:25:835: [debug] ein:query-contents--complete STATUS: 200 DATA: (:name :path :last_modified 2021-02-16T10:32:52.890138Z :created 2021-02-16T10:32:52.890138Z :content [(:name Untitled.ipynb :path Untitled.ipynb :last_modified 2021-02-16T10:32:52.886804Z :created 2021-02-16T10:32:52.886804Z :content nil :format nil :mimetype nil :size 72 :writable t :type notebook)] :format json :mimetype nil :size nil :writable t :type directory) @#<buffer test.org>
11:35:25:874: [debug] EIN:QUERY-PREPARE-HEADER: Found xsrf: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 @#<buffer test.org>
11:35:25:875: [debug] EIN:QUERY-PREPARE-HEADER: Found xsrf: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 @#<buffer test.org>
11:35:25:906: [verbose] Opening notebooklist at http://127.0.0.100:18888 @#<buffer test.org>
11:35:25:909: [debug] EIN:QUERY-PREPARE-HEADER: Found xsrf: 2|83ee41d5|d27367d3e335f5c3571c67fea8d8285f|1613294030 @#<buffer *ein:notebooklist http://127.0.0.100:18888*>
11:35:25:912: [debug] ein:query-contents--complete STATUS: 200 DATA: (:name :path :last_modified 2021-02-16T10:35:25.860642Z :created 2021-02-16T10:35:25.860642Z :content [(:name Untitled1.ipynb :path Untitled1.ipynb :last_modified 2021-02-16T10:35:25.860642Z :created 2021-02-16T10:35:25.860642Z :content nil :format nil :mimetype nil :size 72 :writable t :type notebook) (:name Untitled.ipynb :path Untitled.ipynb :last_modified 2021-02-16T10:32:52.886804Z :created 2021-02-16T10:32:52.886804Z :content nil :format nil :mimetype nil :size 72 :writable t :type notebook)] :format json :mimetype nil :size nil :writable t :type directory) @#<buffer test.org>
11:35:25:914: [verbose] Opened notebook Untitled1.ipynb @#<buffer test.org>
11:35:25:916: [debug] unsh trig=5c938 pdist=8 odist=0 otl=0 ntl=10 conv=0 @#<buffer *ein: http://127.0.0.100:18888/Untitled1.ipynb*>
11:35:26:275: [debug] ein:query-sessions--complete STATUS: 200 DATA: [] @#<buffer *ein: http://127.0.0.100:18888/Untitled1.ipynb*[python]>
11:35:30:583: [warn] ein:dev-packages: Don’t call me! @#<buffer *temp*>
Please copy test.org
here. In particular, I want to know if :session
specifies http://127.0.0.100:18888/foo.ipynb
or http://127.0.0.100:18888
. If the former, I'd want to know if specifying the latter works at all.
Both blocks specified the file. Both cases (with specified notebook and without) work locally and also remote if jupyter is run as jupyter notebook
. Sorry for the confusion, when I tested it last week and compared to the locally running jupyter, I didn't pay attention that the local instance was started by ein
, which used jupyter notebook
, and then wrongly deduced it was a problem with the remote notebook.
The problem is when jupyter is started as jupyter lab
. This has been working some time ago (for sure last summer). Would it be possible to support jupyter lab again?
The problem is when jupyter is started as jupyter lab
I see. Then that would explain these highly suspect lines in your *ein:log-all*
:
11:35:25:461: [debug] ein:query-notebook-version--complete STATUS: 200 DATA: (:version 1.3.0) @#<buffer test.org>
11:35:25:830: [error] ein:content-query-contents--error 404 No such file or directory: foobar.ipynb @#<buffer test.org>
I am accustomed to seeing version 6.x for the notebook protocol. That yours says 1.x is uncharted territory. I'm afraid I don't test jupyter lab
at all. I don't even know what it means since I assumed "jupyterlab" is merely a souped up browser client, and that "jupyterlab" (the client) still connects to a server started by "jupyter notebook" (as opposed to "jupyter lab").
Perhaps I should add a readme caveat saying "jupyter lab" does not work, but the readme is already too long as it is. I cannot comment on why "jupyter lab" appears to have worked last summer as I didn't even know such a thing existed. I won't be looking into it further. Well, thanks for your interest.
One bizzaro thing worth noting here is that if you start using jupyter notebook
, you can switch the path of the URL of the launched notebook UI to /lab
. Then you can use the lab UI in the browser while still being able to work in EIN. There's got to be some part of this approach that will be broken, but I haven't found it yet.
@cwhatley Indeed, thank you for sharing this trick.
Perhaps I should add a readme caveat saying "jupyter lab" does not work, but the readme is already too long as it is
I relented and added the caveat to the readme in 142ff50. It would seem jupyter notebook
is fast becoming obsolete (which would take EIN along with it into obsolescence).
EIN has long been conflating the notebook module version with the notebook api version. This was made clear by martin-liu in #803 . Perhaps try jupyter lab with commit d17c443.
Update Please read below. It was not about remote kernels, but connecting to jupyter lab seems to have stopped working (jupyter v4.6.3)
ob-ein blocks in org-mode have trouble connecting to a remote kernel, which in the past has been working fine. I'm forwarding ports of the remote kernel via ssh to localhost.
It will initially ask for the token, but then fail with
Notebook .ein-python.ipynb pending open! Retry? (y or n) y
. Also the file.ein-python.ipynb
isn't created on the remote instance. Connecting in the browser to the remote kernel works using the same address/port.Also I can connect to jupyter when I start it locally, using the above snippet. Jupyter versions for local and remote are the same:
It seems something has changed in jupyter. Do I need to forward additional ports?