laptop and a wrench

Bug

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

Last Published: October 16, 2015 ArcGIS Pro
Bug ID Number BUG-000091314
SubmittedOctober 9, 2015
Last ModifiedJanuary 20, 2024
Applies toArcGIS Pro
Version found1.1
Operating SystemN/A
Operating System VersionN/A
Version Fixed3.1
StatusFixed

Additional Information

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.

Workaround

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')

Steps to Reproduce

Bug ID: BUG-000091314

Software:

  • ArcGIS Pro

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic