KiPython scripting doesn't work

I’m usng KiCAD 9 PCB layout option on Linux Mint. This has worked before (lots) but now when I try to open the FreeRouter all my plugins are missing and when I click the (grayed out) Python Scripting Console I get a blank KiPython window and a new window called “wxPython - stdout/stderr” with these contents:

Traceback (most recent call last):
File “”, line 1, in
File “/app/share/kicad/scripting/kicad_pyshell/init.py”, line 23, in
import pcbnew
File “/app/lib/python3.13/site-packages/pcbnew.py”, line 68, in
class SwigPyIterator(object):
…<76 lines>…
return self
File “/app/lib/python3.13/site-packages/pcbnew.py”, line 76, in SwigPyIterator
swig_destroy = _pcbnew.delete_SwigPyIterator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: ‘moduledef’ object has no attribute ‘delete_SwigPyIterator’

I’ve uninstalled and reinstalled the program and the problem remains. How do I fix it?

Thanks Robert

Please watch the progress of this issue and add a comment to the issue if you notice any differences between your environment and the problem.
https://gitlab.com/kicad/code/kicad/-/issues/22235