arcpy.da.SeacrchCursor locking itself? Memory Leak?

Discussion created by BrokenLegMike on Apr 17, 2014
Latest reply on Apr 17, 2014 by mzcoyle
I was doing some testing with the da module. I'm running a simple script:

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:

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.