laptop and a wrench

Bug

The combination of overwrite = True and add functions within the script returns the error message, "item...already exists." Overwrite=true is not honored when .add is used within the same statement.

Last Published: July 13, 2022 ArcGIS API for Python
Bug ID Number BUG-000148924
SubmittedMay 2, 2022
Last ModifiedJune 5, 2024
Applies toArcGIS API for Python
Version found2.0.0
Operating SystemN/A
Operating System VersionN/A
StatusWill Not Be Addressed

Additional Information

The overwrite in the add method of the ContentManager is to state whether the item has the possibility to be overwritten. Using add to overwrite is not a recommended workflow, instead, refer to the overwrite method found in the FeatureLayerCollectionManager class: https://developers.arcgis.com/python/api-reference/arcgis.features.managers.html?highlight=overwrite#arcgis.features.managers.FeatureLayerCollectionManager.overwrite.

Workaround

Create a script with conditional statements to bypass the error. Refer to Upload_Update_SHP_HFL as modified script.

Steps to Reproduce

Bug ID: BUG-000148924

Software:

  • ArcGIS API for Python

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options