<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Delete SearchCursor in Python after reference to it has gone in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/delete-searchcursor-in-python-after-reference-to/m-p/334807#M11744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Due to my unfinished python code (I had not deleted my search cursors), while testing it for a second time, the searchcursor creation failed because the table I am trying to access is locked by the previous session. &lt;/P&gt;&lt;P&gt;Now that the program has finished, how can I unlock the table when I have lost the reference to it ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Sep 2014 08:38:30 GMT</pubDate>
    <dc:creator>GeorgieCassar</dc:creator>
    <dc:date>2014-09-22T08:38:30Z</dc:date>
    <item>
      <title>Delete SearchCursor in Python after reference to it has gone</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/delete-searchcursor-in-python-after-reference-to/m-p/334807#M11744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Due to my unfinished python code (I had not deleted my search cursors), while testing it for a second time, the searchcursor creation failed because the table I am trying to access is locked by the previous session. &lt;/P&gt;&lt;P&gt;Now that the program has finished, how can I unlock the table when I have lost the reference to it ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 08:38:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/delete-searchcursor-in-python-after-reference-to/m-p/334807#M11744</guid>
      <dc:creator>GeorgieCassar</dc:creator>
      <dc:date>2014-09-22T08:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Delete SearchCursor in Python after reference to it has gone</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/delete-searchcursor-in-python-after-reference-to/m-p/334808#M11745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you working from a script file(.py) or are you working in the python window interactively(either in IDLE or ArcMap?)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 15:03:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/delete-searchcursor-in-python-after-reference-to/m-p/334808#M11745</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2014-09-22T15:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Delete SearchCursor in Python after reference to it has gone</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/delete-searchcursor-in-python-after-reference-to/m-p/334809#M11746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to restart your python session to release the cursor, I do not believe there is any other way to delete the cursor and release the lock. If you are running a script tool that is running in-process, this means you need to shut down the app (for example, ArcMap) entirely and start up again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is one of the downsides of the old pre 10.x cursors, you had to be very careful to have your python code delete your cursor, usually with a try/except/finally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.da cursors are much better in this way because the with construct is usually used -- if you drop out of the with for any reason, the cursor is deleted by Python for you (since you have left variable scope).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 05:22:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/delete-searchcursor-in-python-after-reference-to/m-p/334809#M11746</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-09-23T05:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Delete SearchCursor in Python after reference to it has gone</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/delete-searchcursor-in-python-after-reference-to/m-p/334810#M11747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ian.&amp;nbsp; I was running my python in a windows command window.&lt;/P&gt;&lt;P&gt;As I didn't have ArcGIS open at all, I wasn't sure what to do.&lt;/P&gt;&lt;P&gt;Then I tried restarting the ArcGIS and SDE services which seems to have remedied the issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 07:12:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/delete-searchcursor-in-python-after-reference-to/m-p/334810#M11747</guid>
      <dc:creator>GeorgieCassar</dc:creator>
      <dc:date>2014-09-23T07:12:25Z</dc:date>
    </item>
  </channel>
</rss>

