I'm trying to insert geometries from one feature class into another and then update an attribute associated with the geometry. Only inserting the geometry works fine, but I can't work out how to insert the new value associated with the geometry. Below insertRow() gives 'TypeError: cannot read geometry sequence'.
import arcpy
aLayer = arcpy.GetParameterAsText(0)
aValue = arcpy.GetParameterAsText(1)
target = "C:\\local.gdb\\target"
desc = arcpy.Describe(aLayer)
type = desc.shapeType
if type == "Polygon":
with arcpy.da.InsertCursor(target, ["SHAPE@","aField"]) as iCursor:
with arcpy.da.SearchCursor(aLayer, ["SHAPE@"]) as sCursor:
for row in sCursor:
iCursor.insertRow([row,aValue])
iCursor.insertRow([row,aValue])
toiCursor.insertRow([row[0],aValue])
.