GNU bug report logs - #50514
28.0.50; org inline call to python src block req C-g to break

Previous Next

Package: org-mode;

Reported by: "Barton, Mark" <Mark.Barton <at> disney.com>

Date: Fri, 10 Sep 2021 23:13:01 UTC

Severity: normal

Full log


Message #75 received at 50514 <at> debbugs.gnu.org (full text, mbox):

From: "Barton, Mark" <Mark.Barton <at> disney.com>
To: Ihor Radchenko <yantar92 <at> gmail.com>
Cc: "50514 <at> debbugs.gnu.org" <50514 <at> debbugs.gnu.org>,
 Lars Ingebrigtsen <larsi <at> gnus.org>, Augusto Stoffel <arstoffel <at> gmail.com>
Subject: Re: bug#50514: 28.0.50; org inline call to python src block req C-g
 to break
Date: Sat, 27 Aug 2022 18:56:56 +0000
[Message part 1 (text/plain, inline)]

On Aug 27, 2022, at 7:11 AM, Ihor Radchenko <yantar92 <at> gmail.com<mailto:yantar92 <at> gmail.com>> wrote:

---
lisp/ob-python.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index 932aca08e..2ad907bd8 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
@@ -197,8 +197,7 @@ (defun org-babel-python-initiate-session-by-key (&optional session)
  (setq py-buffer (org-babel-python-with-earmuffs session)))
(let ((python-shell-buffer-name
       (org-babel-python-without-earmuffs py-buffer)))
-   (run-python cmd)
-   (sleep-for 0 10)))
+   (run-python cmd)))
       ((and (eq 'python-mode org-babel-python-mode)
     (fboundp 'py-shell)) ; python-mode.el
(require 'python-mode)
@@ -225,8 +224,9 @@ (defun org-babel-python-initiate-session-by-key (&optional session)
(defun org-babel-python-initiate-session (&optional session _params)
  "Create a session named SESSION according to PARAMS."
  (unless (string= session "none")
-    (org-babel-python-session-buffer
-     (org-babel-python-initiate-session-by-key session))))
+    (let ((session (org-babel-python-session-buffer
+                    (org-babel-python-initiate-session-by-key session)))))
+    (org-babel-comint-wait-for-output session)))

(defvar org-babel-python-eoe-indicator "org_babel_python_eoe"
  "A string to indicate that evaluation has completed.")
--
2.35.1

I get the following in the Messages:
org-babel-comint-wait-for-output: Buffer python-chain does not exist or has no process

Note that python-chain is the name of my session passed to the python blocks as shown in the following line within my org file.

#+PROPERTY: header-args:python :session python-chain :exports results :results raw file :file-ext table

Thanks,

Mark

[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.