laptop and a wrench

Bug

Deleting multiple feature classes using the ArcPy Delete function fails with the error message, "RuntimeError: Object: Error in executing tool."

Zuletzt veröffentlicht: January 14, 2020 ArcGIS Pro
Bug-ID-Nummer BUG-000121616
EingereichtApril 10, 2019
Zuletzt geändertJune 5, 2024
Gilt fürArcGIS Pro
Gefunden in Version2.3
BetriebssystemN/A
BetriebssystemversionN/A
Behoben in Version2.6
StatusFixed

Workaround

The Delete tool fails with ["a", "b", "c"] but succeeds with ["a;b;c"]. As a workaround follow the steps below:

 

## Use ListFeatureClasses with wildcard to obtain a list of feature classes to be deleted

fclist = arcpy.ListFeatureClasses(...)

arcpy.management.Delete(";".join(fclist))

This works in Python IDLE and standalone script, but does not work in the Python window of ArcGIS Pro.

Schritte zur Reproduzierung

Bug-ID: BUG-000121616

Software:

  • ArcGIS Pro

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln