I am attempting to run a script that throws an error in a seemingly simple statement in bold below:
for i in range(1,len(part)):
cut=part[i-1:i+1]
sides.append(arcpy.Polyline(cut,SR))
I ran the script up to where part is defined then entered:
>>> part
<Array [<Point (2524240.5113, 2562562.7555, #, #)>, <Point (2524240.8774, 2562712.7555, #, #)>, <Point (2524290.3774, 2562712.6347, #, #)>, <Point (2524290.0113, 2562562.6347, #, #)>, <Point (2524240.5113, 2562562.7555, #, #)>]>
>>> c = part[0:2]
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\arcobjects\mixins.py", line 161, in __getitem__
return convertArcObjectToPythonObject(self._arc_object.GetObject(index))
AttributeError: Array: Error in parsing arguments for GetObject
I have tried on two computers, one with python 3 also installed and one without. The python directories returned by sys.path are all there (although the path also includes the non-existent 'C:\\WINDOWS\\SYSTEM32\\python27.zip').
Any ideas on how to troubleshoot this? Thanks.