laptop and a wrench

Bug

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

Zuletzt veröffentlicht: October 16, 2015 ArcGIS Pro
Bug-ID-Nummer BUG-000091314
EingereichtOctober 9, 2015
Zuletzt geändertJanuary 20, 2024
Gilt fürArcGIS Pro
Gefunden in Version1.1
Server-PlattformN/A
Client-PlattformN/A
Version Fixed3.1
StatusFixed

Zusätzliche Informationen

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

Schritte zur Reproduzierung

Bug-ID: BUG-000091314

Software:

  • ArcGIS Pro

Hilfe von ArcGIS-Expert*innen erhalten

Technischen Support kontaktieren

Die Esri Support-App herunterladen

Zu den Download-Optionen

Weitere Informationen zu diesem Thema erkunden