PROBLEM

Running a geoprocessing tool using a Python script fails and returns the 000725 error

Last Published: April 8, 2022

Description

Attempting to run a geoprocessing tool using a Python script fails with the following error message returned:

Error:
000725: <value>: Dataset <value> already exists.

Cause

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.

Solution or Workaround

Enable the 'Allow geoprocessing tools to overwrite existing datasets' option

  1. In ArcGIS Pro, navigate to Project > Options > Geoprocessing.
  2. On the Geoprocessing tab, check the Allow geoprocessing tools to overwrite existing datasets option.
The Options pane with the Geoprocessing tab
  1. Save the project and restart ArcGIS Pro.

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

Software:
  • ArcGIS Pro 2 8 x
  • ArcGIS Pro 2 7 x
  • ArcGIS Pro 2 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options