Hi,
I’m getting this error when I trigger a script using a timer in the event gateway but when I run the script from the script playground it runs ok.
ERROR 11:54:00 AM TimerScriptTask Error executing global timer script: CSVImport @1,000ms . Repeat errors of this type will be logged as ‘debug’ messages.
Traceback (most recent call last):
File “<TimerScript:Wexford/CSVImport @1,000ms >”, line 41, in
File “module:app.CSVImport”, line 174, in ImportPMAC
OSError: (2, ‘No such file or directory’, ‘P:\Export’)
at org.python.core.Py.OSError(Py.java:122)
at org.python.modules.posix.PythonPOSIXHandler.error(PythonPOSIXHandler.java:26)
at org.python.posix.BaseNativePOSIX.stat(BaseNativePOSIX.java:200)
at org.python.posix.LazyPOSIX.stat(LazyPOSIX.java:207)
at org.python.modules.posix.PosixModule.listdir(PosixModule.java:480)
at sun.reflect.GeneratedMethodAccessor283.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)
at org.python.core.PyObject.__call__(PyObject.java:387)
at org.python.core.PyObject.__call__(PyObject.java:391)
at org.python.pycode._pyx1058.ImportPMAC$6(<module:app.CSVImport>:251)
at org.python.pycode._pyx1058.call_function(<module:app.CSVImport>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:120)
at org.python.core.PyFunction.__call__(PyFunction.java:307)
at org.python.pycode._pyx1051.f$0(<TimerScript:Wexford/CSVImport @1,000ms >:44)
at org.python.pycode._pyx1051.call_function(<TimerScript:Wexford/CSVImport @1,000ms >)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1275)
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:554)
at com.inductiveautomation.ignition.common.script.TimerScriptTask.run(TimerScriptTask.java:93)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
less