Hi,
Any reuse of the variable named =f= in python session
causes an error.
Minimal example:
#+begin_src python :session *PY* :results output
f = 2
print(f)
#+end_src
#+RESULTS:
: 2
#+begin_src python :session *PY* :results output
print(f)
#+end_src
#+RESULTS:
: <_io.TextIOWrapper name='/tmp/babel-8s9Pg6/python-P9oMwA' mode='r'
encoding='UTF-8'>
The bug (and suggested fix) is mentioned in the stackexchange post:
https://emacs.stackexchange.com/q/84636/30035
------------------------------------------------------------------------
Emacs : GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.48, cairo version 1.18.2)
of 2025-02-26, modified by Debian
Package: Org mode version 9.7.11 (release_9.7.11 @
/usr/share/emacs/30.1/lisp/org/)