Gateway tag change and scheduled event scripts stopped running

Ignition 8.1.20

I realised that one of my Perspective applications wasn’t collecting data. The status log reported

File "", line 3, in NameError: name 'productionLogging' is not defined

Details
com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File "", line 3, in NameError: name 'productionLogging' is not defined
at org.python.core.Py.NameError(Py.java:261)
at org.python.core.PyFrame.getname(PyFrame.java:257)
at org.python.pycode._pyx4221.f$0(:3)
at org.python.pycode._pyx4221.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:796)
at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:819)
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:748)
at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:800)
at com.inductiveautomation.ignition.common.script.TagChangeScriptExecutor$TagChangeExecutionCallback.execute(TagChangeScriptExecutor.java:242)
at com.inductiveautomation.ignition.common.script.TagChangeScriptExecutor$TagChangeExecutionCallback.execute(TagChangeScriptExecutor.java:194)
at com.inductiveautomation.ignition.common.util.SerialExecutionQueue$PollAndExecute.run(SerialExecutionQueue.java:102)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.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: NameError: name 'productionLogging' is not defined
... 19 common frames omitted

productionLogging is defined and listed.

Gateway scripting tree

I opened the project and saved it without changing anything and it and the scripts are now executing.

Has anyone seen a similar problem?

Could have to do with something internal failing and needing the gateway scripts to restart. When you opened the project and saved, you updated the session props time stamp and that triggered a project refresh.

Which in turn would have re-created all of the scripting and essentially fixed whatever bug was present.

I’m on a older version (8.1.15) and I’ve seen this issue creep up from time to time.

I think I’ve seen it on numerous versions of 8.1.x. No idea what causes it and it happens infrequently (once every couple of months if that)

I usually just restart and move on with my day

If you do anything that doesn’t finish (infinite or really long wait) within an event, that event can’t run again. In most cases, someone is using either sleep() of some kind, or while True:, or both.