laptop and a wrench

漏洞

When using the Data Access module with the UpdateCursor class, row values cannot be updated to null.

上次发布: October 16, 2015 ArcGIS Pro
漏洞 ID 编号 BUG-000091314
已提交October 9, 2015
上次修改时间June 5, 2024
适用范围ArcGIS Pro
找到的版本1.1
操作系统N/A
操作系统版本N/A
修正版本3.1
状态Fixed

附加信息

The issue is fixed in the ArcGIS Pro 3.1 release. To protect backward compatibility, the default behavior remains as is, but there is a new keyword argument for da.UpdateCursor and da.InsertCursor to allow explicit overriding of default values with null.

解决办法

Use the old update cursor or use the Calculate Field geoprocessing tool.

def workaround0():

rows=arcpy.UpdateCursor(os.path.join(geodatabase, fcName))

for row in rows:

row.intField = None

rows.updateRow(row)

def workaround1():

arcpy.CalculateField_management(os.path.join(geodatabase, fcName), 'thisField', 'getNone()', 'PYTHON_9.3', r'def getNone():\n return None')

重现步骤

漏洞 ID: BUG-000091314

软件:

  • ArcGIS Pro

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项