Not able to access file on network shared drive through Gateway event script

I am trying to access the excel file which is kept on a server shared drive through gateway scheduled script. It gives me error as 'Access is denied' on Gateway script. But the good part is I am able to access the same file through script consol.
Any other way to fix this issue?
I am not sure if any other access related jobs to be performed on gateway to access the shared drive file on network?

The error is:

Traceback (most recent call last):
  File "<Scheduled Script>", line 118, in onScheduledEvent
  File "<Scheduled Script>", line 118, in onScheduledEvent
  File "<Scheduled Script>", line 24, in excelToDataSet
  File "<Scheduled Script>", line 24, in excelToDataSet
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(Unknown Source)
	at java.base/java.io.FileInputStream.<init>(Unknown Source)
	at java.base/java.io.FileInputStream.<init>(Unknown Source)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
	at org.python.core.PyReflectedConstructor.constructProxy(PyReflectedConstructor.java:213)
java.io.FileNotFoundException: java.io.FileNotFoundException: \\myDrive\APPRDB\PAM\TMP\Data.XLS (Access is denied)

8.1.25 (b2023021409)
Azul Systems, Inc. 11.0.17

https://docs.inductiveautomation.com/display/DOC81/Mapping+a+Network+Drive

2 Likes

Just so everyone knows, this is near totally useless information in regards to gateway or perspective scripts.

2 Likes

Thank you @victordcq. This will work for me.