# Getting this error when I trigger the script using a timer

**URL:** <https://forum.inductiveautomation.com/t/getting-this-error-when-i-trigger-the-script-using-a-timer/9085>\
**Category:** General Discussion\
**Created:** [September 22, 2014, 11:38am UTC](https://forum.inductiveautomation.com/t/getting-this-error-when-i-trigger-the-script-using-a-timer/9085 "2014-09-22T11:38:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DNal](https://avatars.discourse-cdn.com/v4/letter/d/ba9def/32.png) [@DNal](https://forum.inductiveautomation.com/u/DNal)\
**Post date:** [September 22, 2014, 11:38am UTC](https://forum.inductiveautomation.com/t/getting-this-error-when-i-trigger-the-script-using-a-timer/9085/1 "2014-09-22T11:38:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jim\_lapratt](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jim\_lapratt](https://forum.inductiveautomation.com/u/jim_lapratt)\
**Post date:** [September 22, 2014, 11:48am UTC](https://forum.inductiveautomation.com/t/getting-this-error-when-i-trigger-the-script-using-a-timer/9085/2 "2014-09-22T11:48:24Z")

</div>

Looking at this:

```auto
OSError: (2, 'No such file or directory', 'P:\\Export')
```

My first guess would be your client has this network drive mapping and your gatway does not.

---

<div class="post-metadata">

**Author:** ![DNal](https://avatars.discourse-cdn.com/v4/letter/d/ba9def/32.png) [@DNal](https://forum.inductiveautomation.com/u/DNal)\
**Post date:** [September 22, 2014, 12:22pm UTC](https://forum.inductiveautomation.com/t/getting-this-error-when-i-trigger-the-script-using-a-timer/9085/3 "2014-09-22T12:22:53Z")

</div>

both scripts were ran from gateway machine

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [September 22, 2014, 3:10pm UTC](https://forum.inductiveautomation.com/t/getting-this-error-when-i-trigger-the-script-using-a-timer/9085/4 "2014-09-22T15:10:05Z")

</div>

Mapped drives are per user. By default the Ignition services uses the Local System account.  
You can try changing the path to \ipaddress\Export or changing the service account logon to a domain user.
