gregsexton / ob-ipython

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

Execution hangs with Python 3.7 #195

Closed dschrempf closed 6 years ago

dschrempf commented 6 years ago

Python has received a major upgrade. When executing code with 'ob-ipython', no results are displayed and Emacs hangs forever. It seems to wait for the script 'client.py'.

Debugger entered--Lisp error: (quit)
  call-process-region("print(\"Test\")" nil "/usr/bin/ipython" "/tmp/emacsTwCVxw" t nil "--" "/home/dominik/.emacs.d/elpa/26.1/develop/ob-ipython-20180224.953/client.py" "--conn-file" "default" "--execute")
  apply(call-process-region "print(\"Test\")" nil "/usr/bin/ipython" nil t nil ("--" "/home/dominik/.emacs.d/elpa/26.1/develop/ob-ipython-20180224.953/client.py" "--conn-file" "default" "--execute"))
  ob-ipython--execute-request("print(\"Test\")" "default")
  ob-ipython--execute-sync("print(\"Test\")" ((:colname-names) (:rowname-names) (:result-params "replace" "output" "verbatim") (:result-type . output) (:results . "replace output verbatim") (:exports . "none") (:eval . "never-export") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no") (:session)))
  org-babel-execute:ipython("print(\"Test\")" ((:colname-names) (:rowname-names) (:result-params "replace" "output" "verbatim") (:result-type . output) (:results . "replace output verbatim") (:exports . "none") (:eval . "never-export") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no") (:session)))
  org-babel-execute-src-block(nil ("ipython" "print(\"Test\")" ((:colname-names) (:rowname-names) (:result-params "verbatim" "output" "replace") (:result-type . output) (:results . "verbatim output replace") (:exports . "none") (:session) (:tangle . "no") (:hlines . "no") (:noweb . "no") (:cache . "no") (:eval . "never-export")) "" nil 1010 "(ref:%s)"))
  org-ctrl-c-ctrl-c(nil)
  funcall-interactively(org-ctrl-c-ctrl-c nil)
  call-interactively(org-ctrl-c-ctrl-c nil nil)
  command-execute(org-ctrl-c-ctrl-c)

EDIT: I noticed that jupyter console is crashing. See https://github.com/jupyter/jupyter_console/issues/163

dschrempf commented 6 years ago

Jupyter console works again, must have been a bug upstream.