ERROR
When running the Calculate Geometry Attributes tool in a Python script, the following error may be returned:
TypeError: CalculateGeometryAttributes() takes from 0 to 5 positional arguments but 6 were given.
Prior to ArcGIS Pro 2.5, the Calculate Geometry Attributes tool only accepted 5 parameters:
in_features, geometry_property, {length_unit}, {area_unit}, {coordinate_system}
After the release of ArcGIS Pro 2.5., the tool now accepts 6 parameters:
in_features, geometry_property, {length_unit}, {area_unit}, {coordinate_system}, {coordinate_format}
When running the following line of code it is possible to find out how many parameters the tool accepts with the version in use:
arcpy.management.CalculateGeometryAttributes.__code__.co_argcount
Get help from ArcGIS experts
Download the Esri Support App