laptop and a wrench

Error

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

Última publicación: October 16, 2015 ArcGIS Pro
Número de ID del error BUG-000091314
EnviadoOctober 9, 2015
Última modificaciónJanuary 20, 2024
Relacionado conArcGIS Pro
Versión encontrada1.1
Plataforma del servidorN/A
Plataforma clienteN/A
Version Fixed3.1
EstadoFixed

Información adicional

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.

Solución alternativa

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

Pasos para reproducir

ID del error: BUG-000091314

Software:

  • ArcGIS Pro

Obtener ayuda de expertos en ArcGIS

Contactar con soporte técnico

Descargar la aplicación de soporte de Esri

Ir a las opciones de descarga

Descubrir más sobre este tema