I was working on a Python script to analyze the geometries of a feature class and write something out. It worked fine the first time, but gave an IOError each subsequent time. I narrowed the problem down to the following: (not my actual code, but shows the weird behavior)
arcpy.Exists("MyFeatureClass") # returns true
arcpy.MakeFeatureLayer_management("MyFeatureClass", "MyFeatureLayer")
arcpy.Delete_management("MyFeatureLayer") # returns true
arcpy.Exists("MyFeatureClass") # returns FALSE
Can anyone think of why the feature class would become inaccessible after making a feature layer out of it? Something to do with locks?
