PROBLEM
Attempting to run a geoprocessing tool using a Python script fails with the following error message returned:
Error: 000725: <value>: Dataset <value> already exists.
The 'Allow geoprocessing tools to overwrite existing datasets' option is disabled on the Options tab. If this option is disabled, existing layers with the same name as the output layer may cause the error message to be returned. This is because the Python interpreter is unable to prompt a pop-up window confirming to overwrite the file with the same name.
Enable the 'Allow geoprocessing tools to overwrite existing datasets' option
Set 'overwriteOutput' to true
If the 'Allow geoprocessing tools to overwrite existing datasets' option must be disabled, add the following ArcPy script after importing the necessary modules:
arcpy.env.overwriteOutput = True
Use a different name for the output layer
When specifying the output name in the Output parameter, use a name that is different from the existing layers.
Article ID: 000027490
Get help from ArcGIS experts
Download the Esri Support App