I'm trying to get polygon parts but I get an exception:
File "c:\Users\Mtorres\source\repos\FFP-ArcGISPro-Project\src\Public Inspection\Python Toolboxes\PublicInspectionArcGIS\Centerline.py", line 73, in _extract_parts_from_input_geometry
part = geometry.getPart(index)
File "c:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\arcobjects\arcobjects.py", line 1331, in getPart
return convertArcObjectToPythonObject(self._arc_object.GetPart(*gp_fixargs(args)))
RuntimeError: DescribeGeometry: Error in getting part from geometry
The script runs on ArcGIS Pro v3.2.2. Next script code fragment where I make the call:
parts = []
Solved! Go to Solution.
Thanks for your answer, I'm working with a FileGeodatabase. But I realize that there was a issue with geometries at the feature class: Shape Areas were negatives.
Then I used "Repair Geometries" Tool to fix geometries, and everything start to works fine.
I get this output from tool:
I'm not able to reproduce your error in 3.2.2 nor in 3.1.3, at least in my personal environment (FileGDB and PostgreSQL -ST_Geometry). Are you working in an enterprise geodatabase? Shapefiles? In memory?
I'd perform a geometry check just in case and make sure you are working with proper geometries.
Regards,
Thanks for your answer, I'm working with a FileGeodatabase. But I realize that there was a issue with geometries at the feature class: Shape Areas were negatives.
Then I used "Repair Geometries" Tool to fix geometries, and everything start to works fine.
I get this output from tool: