Wednesday, August 17, 2011

MakeFeatureLayer lock files

When calling the MakeFeatureLayer function in a python script, a lock file is created that may persist even after the script finishes.  To remove the lock file, just call arcpy.Delete_management(layer) before the script terminates.

This forum post provided the answer to this problem.


1 comment:

  1. Thanks, my program was not releasing the lock after running spatial queries on a shape file. This solved it.

    ReplyDelete