Hi all,
I am getting this error in Linkage Mapper 3.2.0 (yes its really 3.2.0 even if it says 3.1.0 in the error message) run in ArcGIS Pro 3.6
Creating shapefiles with linework for links.
---------------------------------
Python error on **line 572** of lm_util.py in Linkage Mapper Version 3.1.0:
SystemError: error return without exception set
The line in question is highlighted in yellow here:
I ran the Polygon to Point tool to create centroid manually in arcGIS Pro in my layer and it all works well.
Thank you for your help!
def get_centroids(shapefile, field):
"""Returns centroids of features"""
try:
pointArray = npy.zeros((0, 3), dtype="float32")
xyCumArray = npy.zeros((0, 3), dtype="float32")
xyArray = npy.zeros((1, 3), dtype="float32")
rows = arcpy.SearchCursor(shapefile)
row = next(rows)
while row:
feat = row.shape
center = feat.centroid
center = str(center)
xy = center.split(" ")
if "," in xy[0] or "," in xy[1]:
msg = ('ERROR: It appears that your region settings are not in '
'USA format (decimal commas are used instead of decimal '
'points). '
'Please change your region settings in Windows to English (USA) or '
'another convention that uses decimal points. You may need to'
'modify the coordinate system of your input files as well.')
raise_error(msg)
xyArray[0, 0] = float(xy[0])
xyArray[0, 1] = float(xy[1])
value = row.getValue(field)
xyArray[0, 2] = int(value)
xyCumArray = npy.append(xyCumArray, xyArray, axis=0)
row = next(rows)