gregsexton / ob-ipython

org-babel integration with Jupyter for evaluation of (Python by default) code blocks
739 stars 109 forks source link

async results fail to appear in org buffer #131

Closed aksarkar closed 10 months ago

aksarkar commented 6 years ago

I'm manually starting a remote kernel on a compute cluster, then connecting my ipython source blocks to it using a named session.

  #+BEGIN_SRC ipython :session kernel-aksarkar.json :async t :results raw drawer
  import tensorflow as tf
  tf.__version__
  #+END_SRC

  #+RESULTS:
  :RESULTS:
  21494e9b-1d1e-49cf-b760-4f7deb12671c
  :END:

Synchronous execution of blocks works fine.

When I set :async t, the output placeholder sometimes fails to be replaced, and I get the following in *Messages*:

error in process sentinel: ipython--async-replace-sentinel: Search failed: "22da3225-4623-4eeb-8753-ad3343ec4595"
error in process sentinel: Search failed: "22da3225-4623-4eeb-8753-ad3343ec4595"

Versions: emacs 25.1.1 org 20171004 ob-ipython 20171008.1500

yitang commented 6 years ago

I am having the same problems. it seems ob-ipython failed to communicate with juypter notebook.

dimitar-petrov commented 5 years ago

Same issue. Did you guys managed to find the reason?

aksarkar commented 5 years ago

In my case, I think it's because an aynchronous block was queued and never dequeued.

I don't yet know how this happens, but it does explain other weird behavior I saw where asynchronous execution wasn't running the correct block (it was running some queued block instead).