Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

arcpy.da.SeacrchCursor locking itself? Memory Leak?

$
0
0
I was doing some testing with the da module. I'm running a simple script:

Code:

with arcpy.da.SearchCursor(x,"*") as rows:
        [str(x) for x in rows.fields]

When I run this the first time, it works. It builds a list of the str method of the field names.

When I run this same script immediately afterwards, it crashes:

Quote:

Traceback (most recent call last):
File "<pyshell#12>", line 1, in <module>
with arcpy.da.SearchCursor(x,"*") as rows:
RuntimeError: cannot open 'GEOMETRY_Area'
I am not sure what is going on here? It seems to be locking on itself or something as I have nothing else open that would lock the dataset. No one else is working on this dataset either. Is this a possible memory leak of the da module? I'm running ArcGIS 10.1 SP1.

Viewing all articles
Browse latest Browse all 2485

Trending Articles