AnsweredAssumed Answered

Script unable to overwrite feature class due to lock file

Question asked by t.faull on Mar 23, 2017
Latest reply on Mar 23, 2017 by t.faull

Hi,

We have a feature class which can be updated using a python script. I've included:

 

# Overwrite pre-existing files
arcpy.env.overwriteOutput = True

 

When ArcCatalog is open and I naviaget to the GeoDatabase with the feature class in it, a LOCK file is created. This however does not prevent the feature class from being overwritten.

 

However, when I drag the feature class into ArcMap, the LOCK file created from this DOES prevent the script from running. The feature class will not be overwritten if an ArcMap LOCK file is present on it.

 

How can I get around this? The feature class is due to be accessed 24/7 on a server. I want my script to run overnight to overwrite the feature class, but I'm worried the LOCK file will prevent.

Outcomes