So I am having an issue where my code was working yesterday but today it isn't. I've restarted my machine just in case but didn't help.
Here is my code:
Input = 'wMeterGPS'
arcpy.AddGeometryAttributes_management(Input, "POINT_X_Y_Z_M")
The Error:
Start Time: Fri Jun 26 11:57:32 2020
Running script AddGeometryAttributes...
WARNING 001097: POINT_X already exists -- overwriting.
WARNING 001097: POINT_Y already exists -- overwriting.
Failed script AddGeometryAttributes...
Traceback (most recent call last):
File "c:\program files (x86)\arcgis\desktop10.7\ArcToolbox\Scripts\AddGeometryAttributes.py", line 292, in <module>
AddGeometryAttributes(fc, geomProperties, lUnit, aUnit, cs)
File "c:\program files (x86)\arcgis\desktop10.7\ArcToolbox\Scripts\AddGeometryAttributes.py", line 56, in AddGeometryAttributes
with arcpy.da.UpdateCursor(fc,fields + ["SHAPE@"],"",cs) as ucur:
TypeError: object() takes no parameters
Failed to execute (AddGeometryAttributes).
The tool adds the "POINT_X" and "POINT_Y" fields but it doesn't calculate the field. I have deleted the fields after it creates them to try the tool again (I know it overwrites but its worth a try) but that doesn't work.
Any help would be great!
Thanks.