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 122 forks source link

"[info] WS action" messages spamming when running notebook in the background #630

Closed veprbl closed 4 years ago

veprbl commented 4 years ago

Following messages appear when I switch away from a notebook that is running and producing output:

ein: [info] WS action [(error ein:worksheet--unshift-undo-list 1886 != 1896)] on-message (ws://127.0.0.1:8888/api/kernels/########-####-####-####-############/channels?session_id=#########-#####-####-#####-############)

This is distracting. I also remember that in older versions of ein it used to trigger the bug, the one when undo used to stop working randomly.

Steps to reproduce:

  1. Run jupyter-notebook (python 3.7)
  2. Start emacs with ein (I move ~/.emacs.d away to not include my configuration)
  3. M-x ein:notebooklist-login, http://127.0.0.1:8888, paste the key
  4. Open new notebook, add a cell with the following code:
    while True:
    print(1)
  5. Execute (C-c C-c), observe "1"s appearing in the output
  6. Switch to a different buffer. Since we want to see the error, let's switch to *Messages*
  7. Wait few minutes without touching anything
  8. Messages start popping up

System:

veprbl commented 4 years ago

On my real work configuration with real notebooks I get a slightly different message:

ein: [info] WS action [(wrong-type-argument sequencep t)] on-message (ws://127.0.0.1:8888/api/kernels/########-####-####-####-############/channels?session_id=########-####-####-####-############)

From emacs I use ido-mode, TRAMP plus some minor extensions like multiple cursors, some syntax highlighting not relevant to python.

millejoh commented 4 years ago

Thank you for this. The error is very repeatable, though maybe a bit difficult to understand. I've jiggered the code which seems to have made this go away. The only question now is if I have broken everything else in the process...