I have a feature class and I want to move its objects based on two fields in it I used the following code but get error:
with arcpy.da.UpdateCursor(fc2,["SHAPE@XY","centerpo_4","centerpo_5"]) as cursor: for row in cursor: XM=row YM=row cursor.updateRow([row+ XM,row+YM])
The columns "centerpo_4","centerpo_5" are two fields within the feature class. When I run the code I encounter with following error:
Traceback (most recent call last): File "C:\Users\Rezars\Desktop\test2.py", line 34, in <module> cursor.updateRow([row+ XM,row+YM]) TypeError: sequence size must match size of the row
The number of objects in the table are 2893 (FID starts from 0)which all three columns have the same row numbers(2893).