Synctex is not working with pyluatex (using latexmk in TeXworks, MiKTeX, Windows 10)

I have recently started to experiment with the pyluatex package (which lets you include Python 3 code in a .tex document, and have it run during the .tex compilation process).

https://www.ctan.org/pkg/pyluatex

I have a setup that I am pretty happy with, except that I haven't gotten synctex (forward-inverse-search) to work. My documents compile properly and I do get proper .pdf output; the only problem is that I also get a synctex(busy) file (so of course Ctrl-click in the source or the output doesn't do anything).

Here is a minimal example where synctex doesn't work:

\documentclass{article}
\usepackage[executable=python.exe]{pyluatex}
\begin{document}

Hello

\end{document}


It would not surprise me if my question is related to this one. However, please note that synctex works properly if I do not use pyluatex. For example, the following document compiles and produces a .pdf and a synctex.gz file, and synctex seems to work just fine:

\documentclass{article}
%\usepackage[executable=python.exe]{pyluatex}
\begin{document}

Hello

\end{document}


In case it is relevant, I am using Windows 10, with TeXworks (0.6.6) and MiKTeX (21.12.10), and I am using the following typesetting options (available from the Edit, Preferences, Typesetting menu in TeXworks):

Program:

latexmk


Arguments:

-lualatex
--synctex=1
--shell-escape
\$fullname


(Latexmk seems to be version 4.76.)

I guess the question is: Why is synctex not working for me? In other words, am I doing something wrong (perhaps with the Typesetting options I am using)? Or maybe I have installed something wrong, or need to update something. Please let me know if there is further information that I should have provided.

• Welcome to TeX.SE! Jan 26 at 19:47