Error calculating central point coordinates

10-05-2020 05:46 PM
New Contributor III

I am having issues running the central point geometry attributes calculation. I do the centroid calculation and it works perfectly fine in the same way. Any idea with this problem?

Traceback (most recent call last):
File "C:\Program Files\ArcGIS\Pro\Resources\ArcToolBox\Scripts\", line 396, in <module>
File "C:\Program Files\ArcGIS\Pro\Resources\ArcToolBox\Scripts\", line 85, in execute
row = self.ShapeCalc(row, geom, geomProperties)
File "C:\Program Files\ArcGIS\Pro\Resources\ArcToolBox\Scripts\", line 173, in ShapeCalc
row = self.Update(row, "INSIDE_X", geom.centroid.X)
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\arcobjects\", line 90, in _get
return convertArcObjectToPythonObject(getattr(self._arc_object, attr_name))
SystemError: <built-in function getattr> returned NULL without setting an error
Failed to execute (Add Geometry Attributes).
Failed to execute (Model).

0 Kudos
1 Reply
MVP Esteemed Contributor

To be sure, run a Check Geometry, and if necessary a Repair Geometry on the data.

It may be useful to run a MultiPartToSinglePart tool is case you have multipart shapes and it is causing the issue.

... sort of retired...