laptop and a wrench

漏洞

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

上次发布: January 14, 2020 ArcGIS Pro
漏洞 ID 编号 BUG-000121616
已提交April 10, 2019
上次修改时间June 5, 2024
适用范围ArcGIS Pro
找到的版本2.3
操作系统N/A
操作系统版本N/A
修正版本2.6
状态Fixed

解决办法

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.

重现步骤

漏洞 ID: BUG-000121616

软件:

  • ArcGIS Pro

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项