Gateway Script Error: super(type, obj): obj must be an instance or subtype of type

I have a timer event script that calls a project script. On saving the project, thus restarting the gateway scripts, I occasionally get this error in the log. Subsequent events seem to work as desired. Is this an artifact of restarting while a longer-running script is in the middle of running? It’s on a dedicated thread.

com.inductiveautomation.ignition.common.script.JythonExecException: TypeError: super(type, obj): obj must be an instance or subtype of type
at org.python.core.Py.TypeError(Py.java:236)
at org.python.core.PySuper.supercheck(PySuper.java:96)
at org.python.core.PySuper.super___init__(PySuper.java:51)
at org.python.core.PySuper$exposed___new__.createOfType(Unknown Source)
at org.python.core.PyOverridableNew.new_impl(PyOverridableNew.java:12)
at org.python.core.PyType.invokeNew(PyType.java:1119)
at org.python.core.PyType.type___call__(PyType.java:2399)
at org.python.core.PyType.__call__(PyType.java:2389)
at org.python.core.PyObject.__call__(PyObject.java:477)
at org.python.core.PyObject.__call__(PyObject.java:481)
at org.python.pycode._pyx77.__getitem__$30(:171)
at org.python.pycode._pyx77.call_function()
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyBaseCode.call(PyBaseCode.java:150)
at org.python.core.PyFunction.__call__(PyFunction.java:426)
at org.python.core.PyMethod.__call__(PyMethod.java:141)
at org.python.core.PyMethod.__call__(PyMethod.java:132)
at org.python.core.PyListDerived.__getitem__(PyListDerived.java:959)
at org.python.pycode._pyx74.push$1(:121)
at org.python.pycode._pyx74.call_function()
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyBaseCode.call(PyBaseCode.java:150)
at org.python.core.PyFunction.__call__(PyFunction.java:426)
at org.python.pycode._pyx72.f$0(:1)
at org.python.pycode._pyx72.call_function()
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1687)
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:800)
at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:680)
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:746)
at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:661)
at com.inductiveautomation.ignition.common.script.TimerScriptTask.run(TimerScriptTask.java:92)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.python.core.PyException: TypeError: super(type, obj): obj must be an instance or subtype of type

I get this error pretty regularly when I save a project too.
The error is pointing at a problem with python inheritance but it all works fine.
It would be good to eliminate it.
Can anyone shed light onto what’s causing it and how to get rid of it?