atvanwie

AddGeometryAttributes_management failing to execute

Discussion created by atvanwie on Jun 12, 2019
Latest reply on Jun 14, 2019 by rvburton

I'm having a problem where I'm trying to calculate area of geometry but it is failing in my Python script. Using ArcGIS 10.6.1.

arcpy.AddGeometryAttributes_management("layername", "AREA", Area_Unit="SQUARE_KILOMETERS") 

Traceback (most recent call last):

  File "c:\program files (x86)\arcgis\desktop10.6\ArcToolbox\Scripts\AddGeometryAttributes.py", line 292, in <module>

    AddGeometryAttributes(fc, geomProperties, lUnit, aUnit, cs)

  File "c:\program files (x86)\arcgis\desktop10.6\ArcToolbox\Scripts\AddGeometryAttributes.py", line 49, in AddGeometryAttributes

    fields = CreateOutputFields(fc, geomProperties, hasZ, hasM)

  File "c:\program files (x86)\arcgis\desktop10.6\ArcToolbox\Scripts\AddGeometryAttributes.py", line 232, in CreateOutputFields

    currentFields = [field.name for field in arcpy.ListFields(fc)]

TypeError: 'geoprocessing list object' object is not iterable

 

Failed to execute (AddGeometryAttributes).

Any ideas? 

Outcomes