Org mode errors out when trying to export a python code block to html. This error seems to be specific to python, as json and bash src blocks work. Furthermore, I can export to latex, markdown and txt. Prior to exporting, the python syntax does get highlighted properly.
Minimal example needed to reproduce:
#+title: Testing exporting python
#+begin_src python
x = 1
#+end_src
Then org-export-dispatch
> h
> h
(or H
or o
)
Changing the src tag to #+begin_src py
fixes the problem (but breaks syntax highlighting)
Changing the src tag to #+begin_src python :exports none
also fixes the problem (by not including the python at all in the export)
The error generated is or: Cannot detect source file name; buffer is not visiting a file
org-babel-load-languages
is
((python . t)
(emacs-lisp . t))
Doom emacs with several things added on
GNU Emacs 28.2.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2022-11-01
emacs -Q
and perhaps some minimal initialization (enabling python for babel e.g.)? If not, then your init file is the culprit: bisect it to figure out what exactly causes the problem.