I am trying to replace NULL values for -999 in a table inside a gdb. I know how to replace the value for individual fields, but get an error when looping through the complete table.
import arcpyfc ="C:\gSSURGO.gdb\chorizon_va_1"fieldList = arcpy.ListFields(fc)with arcpy.UpdateCursor(fc, [fieldList]) as cursor: fRange = range(len(fieldList)) for row in cursor: for index in fRange: if row[index] == None: row[index] = -999 cursor.updateRow(row)And this is the error I get:
Runtime error : 'Cursor' object has no attribute '_exit_'I found some examples using arcpy.da.UpdateCursor, but when I use that I get this error:
Runtime error : 'module' object has no attribute 'da'
أكثر...
import arcpyfc ="C:\gSSURGO.gdb\chorizon_va_1"fieldList = arcpy.ListFields(fc)with arcpy.UpdateCursor(fc, [fieldList]) as cursor: fRange = range(len(fieldList)) for row in cursor: for index in fRange: if row[index] == None: row[index] = -999 cursor.updateRow(row)And this is the error I get:
Runtime error : 'Cursor' object has no attribute '_exit_'I found some examples using arcpy.da.UpdateCursor, but when I use that I get this error:
Runtime error : 'module' object has no attribute 'da'
أكثر...