laptop and a wrench

Bogue

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

Dernière publication: October 16, 2015 ArcGIS Pro
Numéro d’ID de bogue BUG-000091314
EnvoiOctober 9, 2015
Dernière modificationJanuary 20, 2024
S’applique àArcGIS Pro
Version trouvée1.1
Plateforme serveurN/A
Plateforme clientN/A
Version Fixed3.1
StatutFixed

Informations supplémentaires

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.

Solution de contournement

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

Étapes pour reproduire

ID de bogue: BUG-000091314

Logiciel:

  • ArcGIS Pro

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement

En savoir plus sur ce sujet