laptop and a wrench

Erro

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

Última Publicação: October 16, 2015 ArcGIS Pro
Número de ID do Erro BUG-000091314
EnviadoOctober 9, 2015
Última ModificaçãoJanuary 20, 2024
Aplica-se àArcGIS Pro
Versão encontrada1.1
Plataforma do servidorN/A
Plataforma do clienteN/A
Version Fixed3.1
StatusFixed

Informações Adicionais

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.

Solução Provisória

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

Etapas para Reproduzir

ID do Erro: BUG-000091314

Software:

  • ArcGIS Pro

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com suporte técnico

Baixe o Esri Support App

Ir para opções de download

Descubra mais sobre este tema