Greetings,
I am using the ESRI example to try and return the Features extent, getting an error:
Extent—ArcGIS Pro | Documentation
TypeError: '<' not supported between instances of 'Polyline' and 'Polyline'
The error is at the for row in sorted:
for dirpath, dirnames, filenames in arcpy.da.Walk(workspace, topdown=True, datatype=data_type):
#datasets = [''] + datasets if datasets is not None else []
for filename in filenames:
for row in sorted(arcpy.da.SearchCursor(filename, ['Shape@'])):
#print(filename)
extent = row[0].extent
print(filename, extent)
Appreciate any pointers.
Thanks,
Clive
Solved! Go to Solution.
It didn't like the sorted..
It probably would, but you'd need to give it a non-spatial field on which to sort.
It didn't like the sorted..
It probably would, but you'd need to give it a non-spatial field on which to sort.