Essentially I am trying to calculate a value for a couple of fields after adding them. Below you can see how I am adding the fields and then an example on how my "for" statement is looping through the cursors to add values.
I keep getting an error: "TypeError: sequence size must match size of the row"
I'm not sure what to do about this. Is there a better method than to use the UpdateCursor updateRow statements?
fieldName = ["azVEqSet", "azVERis"]
try:
arcpy.AddField_management(points, fieldName[0] ,"FLOAT")
arcpy.AddField_management(points, fieldName[1] ,"FLOAT")
except:
arcpy.DeleteField_management(points, [fieldName[0], fieldName[1]])
arcpy.AddField_management(points, fieldName[0] ,"FLOAT")
arcpy.AddField_management(points, fieldName[1] ,"FLOAT")
cursor = arcpy.da.UpdateCursor(points, ["azVEqSet", "azVERis", "POINT_X", "RASTERVALU", "POINT_Y"])
for row in cursor:
...
numberInsert = ReturnedVariable
row[0] = numberInsert
cursor.updateRow([row])