laptop and a wrench

Error

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

Última publicación: January 14, 2020 ArcGIS Pro
Número de ID del error BUG-000121616
EnviadoApril 10, 2019
Última modificaciónJune 5, 2024
Relacionado conArcGIS Pro
Versión encontrada2.3
Sistema operativoN/A
Versión de sistema operativoN/A
Versión corregida2.6
EstadoFixed

Solución alternativa

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.

Pasos para reproducir

ID del error: BUG-000121616

Software:

  • ArcGIS Pro

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga