millejoh / emacs-ipython-notebook

Jupyter notebook client in Emacs
http://millejoh.github.io/emacs-ipython-notebook/
GNU General Public License v3.0
1.47k stars 123 forks source link

Retry content-query-contents #0 in response to nil #819

Closed nyambol closed 2 years ago

nyambol commented 2 years ago

Problem description

Unable to save after clearing outputs to get notebook to load.

Steps to reproduce the problem

[error] request--callback: peculiar error [4 times] ein: [error]
ein:content-query-contents--error
http://127.0.0.1:8888/Case_Study1_Notebook.ipynb REQUEST-STATUS
timeout DATA interrupt

Notebook Case_Study1_Notebook.ipynb pending open! Retry? (y or n) y

ein: [error] ein:content-save-error:
http://127.0.0.1:8888/api/contents/Case_Study1_Notebook.ipynb peculiar
error.
ein: [warn] Failed saving notebook!

System info:

("EIN system info"
 :emacs-version "GNU Emacs 29.0.50 (build 1, x86_64-w64-mingw32)
 of 2021-10-12"
 :window-system w32
 :emacs-variant nil
 :build
 "--without-dbus --with-native-compilation --without-pop --prefix=/c/Emacs/emacs29.1"
 :os
 (:uname
  "MSYS_NT-10.0-19043 Laura-Burns-Desktop 3.2.0-340.x86_64 2021-08-02 16:30 UTC x86_64 Msys
"
  :lsb-release nil)
 :jupyter
 "Selected Jupyter core packages...
IPython          : 7.29.0
ipykernel        : 6.5.0
ipywidgets       : not installed
jupyter_client   : 7.0.6
jupyter_core     : 4.9.1
jupyter_server   : 1.11.2
jupyterlab       : 3.2.1
nbclient         : 0.5.4
nbconvert        : 6.2.0
nbformat         : 5.1.3
notebook         : 6.4.5
qtconsole        : not installed
traitlets        : 5.1.1
"
 :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 "20211012.347"
       :source-dir "c:/Users/micha/AppData/Roaming/.emacs.d/elpa/ein-20211012.347/")
 :lib
 ((:name "websocket"
     :path "~/.emacs.d/elpa/websocket-20210110.17/websocket.el"
     :featurep t
     :version-var websocket-version
     :version "1.12")
  (:name "anaphora"
     :path "~/.emacs.d/elpa/anaphora-20180618.2200/anaphora.el"
     :featurep t
     :version-var nil
     :version nil)
  (:name "request"
     :path "~/.emacs.d/elpa/request-20210816.200/request.el"
     :featurep t
     :version-var request-version
     :version "0.3.3")
  (:name "deferred"
     :path "~/.emacs.d/elpa/deferred-20170901.1330/deferred.el"
     :featurep t
     :version-var deferred:version
     :version "0.5.0")
  (:name "polymode"
     :path "~/.emacs.d/elpa/polymode-20210907.807/polymode.el"
     :featurep t
     :version-var nil
     :version nil)
  (:name "dash"
     :path "~/.emacs.d/elpa/dash-20210826.1149/dash.el"
     :featurep t
     :version-var nil
     :version nil)
  (:name "with-editor"
     :path "~/.emacs.d/elpa/with-editor-20211015.1917/with-editor.el"
     :featurep nil
     :version-var nil
     :version nil)))

Logs:

ein:log-all:

15:01:42:984: [info] ein:jupyter-server--run: c:/Python310/Scripts/jupyter.exe notebook --notebook-dir=c:/Users/micha/Dropbox/src/python/bookcamp_code/Case_Study1/ --no-browser @#<buffer Case_Study1_Notebook.ipynb>
15:01:45:821: [info] ein:jupyter-process-lines: jupyter exited with status 1 @#<buffer Case_Study1_Notebook.ipynb>
15:01:46:154: [info] Login to http://127.0.0.1:8888 complete. @#<buffer Case_Study1_Notebook.ipynb>
15:01:47:353: [verbose] Opening notebooklist at http://127.0.0.1:8888 @#<buffer Case_Study1_Notebook.ipynb>
15:01:48:604: [verbose] Retry content-query-contents #0 in response to nil @#<buffer *ein:notebooklist http://127.0.0.1:8888*>
15:01:50:315: [verbose] Retry content-query-contents #1 in response to nil @#<buffer *ein:notebooklist http://127.0.0.1:8888*>
15:01:52:534: [verbose] Retry content-query-contents #2 in response to nil @#<buffer *ein:notebooklist http://127.0.0.1:8888*>
15:01:55:230: [error] ein:content-query-contents--error http://127.0.0.1:8888/Case_Study1_Notebook.ipynb REQUEST-STATUS timeout DATA interrupt
 @#<buffer *ein:notebooklist http://127.0.0.1:8888*>
15:02:07:736: [verbose] Retry content-query-contents #0 in response to nil @#<buffer  *Minibuf-1*>
15:02:09:458: [verbose] Retry content-query-contents #1 in response to nil @#<buffer *ein:notebooklist http://127.0.0.1:8888*>
15:02:09:512: [verbose] Opened notebook Case_Study1_Notebook.ipynb @#<buffer *ein:notebooklist http://127.0.0.1:8888*>
15:02:11:865: [verbose] ein:kernel-retrieve-session--success: kernel-id=e18fd69f-3ac9-457d-a42d-3cc8fa8f8af2 session-id=6f3c39ea-7abf-4a92-9f74-5c3453f94d91 @#<buffer *ein:notebooklist http://127.0.0.1:8888*>
15:02:11:865: [verbose] WS start: ws://127.0.0.1:8888/api/kernels/e18fd69f-3ac9-457d-a42d-3cc8fa8f8af2/channels?session_id=6f3c39ea-7abf-4a92-9f74-5c3453f94d91 @#<buffer *ein:notebooklist http://127.0.0.1:8888*>
15:02:12:483: [verbose] Retry content-query-contents #2 in response to nil @#<buffer *ein:notebooklist http://127.0.0.1:8888*>
15:02:12:991: [info] Notebook Case_Study1_Notebook.ipynb is ready @#<buffer *ein:notebooklist http://127.0.0.1:8888*>
15:02:12:992: [verbose] WS opened: ws://127.0.0.1:8888/api/kernels/e18fd69f-3ac9-457d-a42d-3cc8fa8f8af2/channels?session_id=6f3c39ea-7abf-4a92-9f74-5c3453f94d91 @#<buffer *ein:notebooklist http://127.0.0.1:8888*>
15:02:13:076: [verbose] Opening notebooklist at http://127.0.0.1:8888 @#<buffer *ein:notebooklist http://127.0.0.1:8888*>
15:02:15:277: [error] ein:content-query-contents--error http://127.0.0.1:8888/Case_Study1_Notebook.ipynb REQUEST-STATUS timeout DATA interrupt
 @#<buffer *ein:notebooklist http://127.0.0.1:8888*>
15:02:29:681: [verbose] Notebook is saved. @#<buffer  *ein: http://127.0.0.1:8888/Case_Study1_Notebook.ipynb*[ein:markdown]>
15:02:45:352: [error] ein:content-save-error: http://127.0.0.1:8888/api/contents/Case_Study1_Notebook.ipynb peculiar error. @#<buffer  *ein: http://127.0.0.1:8888/Case_Study1_Notebook.ipynb*[ein:markdown]>
15:02:45:353: [warn] Failed saving notebook! @#<buffer  *ein: http://127.0.0.1:8888/Case_Study1_Notebook.ipynb*[ein:markdown]>
15:02:53:143: [error] ein:content-save-error: http://127.0.0.1:8888/api/contents/Case_Study1_Notebook.ipynb peculiar error. @#<buffer  *ein: http://127.0.0.1:8888/Case_Study1_Notebook.ipynb*[ein:markdown]>
15:02:53:144: [warn] Failed saving notebook! @#<buffer  *ein: http://127.0.0.1:8888/Case_Study1_Notebook.ipynb*[ein:markdown]>
15:03:19:006: [warn] ein:dev-packages: Don’t call me! @#<buffer  *temp*>

ein server:

[W 2021-11-04 15:01:45.220 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-11-04 15:01:45.220 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-11-04 15:01:45.220 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2021-11-04 15:01:45.236 LabApp] JupyterLab extension loaded from C:\Python310\Lib\site-packages\jupyterlab
[I 2021-11-04 15:01:45.236 LabApp] JupyterLab application directory is C:\Python310\share\jupyter\lab
[I 15:01:45.252 NotebookApp] Serving notebooks from local directory: c:/Users/micha/Dropbox/src/python/bookcamp_code/Case_Study1/
[I 15:01:45.252 NotebookApp] Jupyter Notebook 6.4.5 is running at:
[I 15:01:45.252 NotebookApp] http://localhost:8888/?token=810c0ed862a14bdd469f2f2bfa6684a819ee4217b999d611
[I 15:01:45.252 NotebookApp]  or http://127.0.0.1:8888/?token=810c0ed862a14bdd469f2f2bfa6684a819ee4217b999d611
[I 15:01:45.252 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 15:01:45.252 NotebookApp] 

    To access the notebook, open this file in a browser:
        file:///C:/Users/micha/AppData/Roaming/jupyter/runtime/nbserver-15904-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=810c0ed862a14bdd469f2f2bfa6684a819ee4217b999d611
     or http://127.0.0.1:8888/?token=810c0ed862a14bdd469f2f2bfa6684a819ee4217b999d611
[I 15:01:45.938 NotebookApp] 302 POST /login (127.0.0.1) 0.000000ms
[I 15:01:45.938 NotebookApp] 302 GET / (127.0.0.1) 0.000000ms
[W 15:01:46.270 NotebookApp] Serving api spec (experimental, incomplete)
[W 15:01:47.773 NotebookApp] Notebook Case_Study1_Notebook.ipynb is not trusted
[W 15:01:49.493 NotebookApp] Notebook Case_Study1_Notebook.ipynb is not trusted
[W 15:01:51.714 NotebookApp] Notebook Case_Study1_Notebook.ipynb is not trusted
[W 15:01:54.420 NotebookApp] Notebook Case_Study1_Notebook.ipynb is not trusted
[W 15:02:06.926 NotebookApp] Notebook Case_Study1_Notebook.ipynb is not trusted
[W 15:02:08.625 NotebookApp] Notebook Case_Study1_Notebook.ipynb is not trusted
[W 15:02:09.193 NotebookApp] Notebook Case_Study1_Notebook.ipynb is not trusted
[I 15:02:11.262 NotebookApp] Kernel started: e18fd69f-3ac9-457d-a42d-3cc8fa8f8af2, name: python3
[W 15:02:11.514 NotebookApp] Notebook Case_Study1_Notebook.ipynb is not trusted
[W 15:02:14.397 NotebookApp] Notebook Case_Study1_Notebook.ipynb is not trusted
[I 15:02:28.940 NotebookApp] Saving file at /Case_Study1_Notebook.ipynb
[I 15:02:44.415 NotebookApp] Saving file at /Case_Study1_Notebook.ipynb
[I 15:02:52.203 NotebookApp] Saving file at /Case_Study1_Notebook.ipynb
dickmao commented 2 years ago

I'm afraid once this happens,

Retry content-query-contents #0 in response to nil

then all bets are off since this means EIN can't manage processes. Sorry.

nyambol commented 2 years ago

Maybe, you should just put a sign out front, "doesn't work on Windows." Save people from f'ing around trying to make it work.

dickmao commented 2 years ago

You got it..