Python program stops on "DeleteIdentical" without an error message.

703
1
08-20-2013 09:22 AM
BillMiller
New Contributor
Python program stops running but there is not an error message.  I know that the "Repair" is completed without a problem because I had print statements giving me the status of the program.  After the program stops, I am able to start ArcMap and I can use the "DeleteIdentical" tool manually without a problem on the output data and it removes 171 duplicate lines.

Below is the code and I have tried several things like putting a tolerance for the DeleteIdentical and skipping the MultpartToSinglePart and I added the part to do a Repair. Also, tried using "in_memory" instead of a file-geodatabase.  This exact same code has worked in the past.

#  stream is the path to the file-geodatabase feature class.  
arcpy.Identity_analysis (stream + "3", "BrdgDeck", stream + "4")
arcpy.MultipartToSinglepart_management (stream + "4", stream + "5")
arcpy.RepairGeometry_management (stream + "5")
arcpy.DeleteIdentical_management (stream + "5", ["Shape", "NOTE"])
Tags (2)
0 Kudos
1 Reply
BillMiller
New Contributor
I found the problem.
Apparently the "DeleteIdentical" tool does not like the environment for Extent even if the extent covers the entire feature class.

The fix was to set the extent to:
arcpy.env.Extent = "MAXOF"

It only took me 4 hours to figure that out.
0 Kudos