emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Python session raises indentation error [9.2.6 (9.2.6-elpa @ /home/tobias/.emacs.d/elpa/org-9.2.6/)]
@ 2019-10-14 17:55 Tobias Müller
  2019-10-14 18:24 ` Tobias Müller
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Müller @ 2019-10-14 17:55 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 886 bytes --]

Dear org-mode developer,

I have discovered the following issue with Python code-blocks: Using the
:session header argument leads to errors of the type IndentationError:
expected an indented block if the code block contains indented regions
with empty lines. An example code-block which produces this kind of
error is the following:

#+begin_src python :session
   for k in range(3):

       print(k)
#+end_src

removing the :session header argument leads to correct execution of the
code block. The same is true if the :results output header argument is used.

If the blank line within the for-loop is removed the loop also gets
executed correctly, however after executing the block the error
NameError: name '_' is not defined is raised in the buffer of the Python
session.

The generated info-file is attached to this mail.

Best regards,
Tobias Müller.


[-- Attachment #1.2: Type: text/html, Size: 1270 bytes --]

[-- Attachment #2: info --]
[-- Type: application/octet-stream, Size: 251133 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-14 18:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14 17:55 Bug: Python session raises indentation error [9.2.6 (9.2.6-elpa @ /home/tobias/.emacs.d/elpa/org-9.2.6/)] Tobias Müller
2019-10-14 18:24 ` Tobias Müller

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).