Trying to read file in Mapped Network Drive

I’m trying to read a text file in a mapped network drive named Z:. I altered the Ignition.conf file to configure the network drive. When I reviewed the wrapper logs to see if it connected successfully, I saw this so it seems it worked.

INFO   | wrapper  | 2020/01/14 14:36:44 | Attempting to map the "\\\upsTagInfo" share to "Z:"...
INFO   | wrapper  | 2020/01/14 14:36:44 |   Mapped "Z:".

Whenever I run this script to read the file and write it to a tag, it fails

path = '\\\\Z:upsLogs.txt'
	contents = system.file.readFileAsStringpath(path)
	contents = 'failed'

Path should surely be: “path = ‘\\Z:\upsLogs.txt’” ?

Nevermind, omg I had a typo!!

contents = system.file.readFileAsStringpath(path)

should be

contents = system.file.readFileAsString(path)

Glad you got sorted, and p.s. I forgot to enclose in a code block so the format of my suggested path is also wrong!

1 Like

Hi, I am having a similar problem.

Can anyone help me confirm the syntax required?

Mapping a Network Drive



Check this thread Network File Sharing - Ignition - Inductive Automation Forum
and the manual if you haven't already.
Mapping a Network Drive - Ignition User Manual 8.1 - Ignition Documentation (

1 Like


I've used the "net use" command on the server and discovered that the syntax should be:

I've updated the conf file, stopped, and started the gateway but to no avail.

Uncomment the wrapper debugging line in the config file then start and stop again. Then after the gateway starts back up, check the logs in the gateway webpage under Diagnostics > Logs.

# Enables Debug output from the Wrapper.
1 Like

thanks for the tip, what am i searching for in the logs?

probably something like this

wrapper | Attempting to map the "\\fileserver\folder" share to "S:"...
wrapper | Unable to map "S:". Attempt #1 (The network name cannot be found. (0x43))
wrapper | Attempting to map the "\\fileserver\folder" share to "S:"...
wrapper | Unable to map "S:". Trying to continue. (The network name cannot be found. (0x43))


I do not see that error in the logs

Oops, I was wrong on log location

The location of the log file is in the main Ignition installation folder as wrapper.log.

DEBUG | wrapper | 2022/12/08 08:28:26 | Network Mapping Details:
DEBUG | wrapper | 2022/12/08 08:28:26 | Location: \Server\Site_Brooklyn
DEBUG | wrapper | 2022/12/08 08:28:26 | Target: V:
DEBUG | wrapper | 2022/12/08 08:28:26 | Account: <N/A> (Password: <N/A>)
DEBUG | wrapper | 2022/12/08 08:28:26 | Type: DISK
DEBUG | wrapper | 2022/12/08 08:28:26 | Startup:
DEBUG | wrapper | 2022/12/08 08:28:26 | On Failure: CONTINUE
DEBUG | wrapper | 2022/12/08 08:28:26 | On Premapped: CONTINUE
DEBUG | wrapper | 2022/12/08 08:28:26 | Max Retries: 5
DEBUG | wrapper | 2022/12/08 08:28:26 | Retry Interval: 10
DEBUG | wrapper | 2022/12/08 08:28:26 | Shutdown:
DEBUG | wrapper | 2022/12/08 08:28:26 | Unmap: FALSE (Force: FALSE)
INFO | wrapper | 2022/12/08 08:28:26 | Attempting to map the "\Server\Site_Brooklyn" share to "V:"...
INFO | wrapper | 2022/12/08 08:28:26 | "V:" is already defined. Trying to continue

How do you know it isn't working?


I'm not 100% sure tbh. this the first in the script being called:
def Read_CSV_File(filePath):
import csv
with open(filePath,"r") as csvFile:
csvData= csv.DictReader(csvFile,header)

        for row in csvData:

    return listDict
    Error("Failed to read Item Master CSV")

The wrapper config maps a drive to Ignition on the gateway. So for it to work the script must be called in a gateway scope ie tag change script, gateway event script...

1 Like

It's definitely a gateway script.

Do you have multiple mappings all trying to use "V" ?

Remove the try except so you can get the backtrace when it fails, which will be in gateway logs.

I think this happens when you map a network drive on the gateway computer as X: then map it with ignition using the same X letter. I think I've done this myself, but it still works.

1 Like


Not on the gateway server. I do on my base computer.