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 modificationJune 5, 2024
S’applique àArcGIS Pro
Version trouvée1.1
Système d’exploitationN/A
Version du système d’exploitationN/A
Version de correction3.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

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

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