<?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 Re: Can I have multiple open arcpy.da.InsertCursor at the same time? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350015#M27440</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I believe it's data related.&amp;nbsp; I think I've got it sorted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Marking the original answer as correct.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Oct 2012 16:58:14 GMT</pubDate>
    <dc:creator>TimDine</dc:creator>
    <dc:date>2012-10-04T16:58:14Z</dc:date>
    <item>
      <title>Can I have multiple open arcpy.da.InsertCursor at the same time?</title>
      <link>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350011#M27436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is this possible or do you have to delete one cursor before opening another?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I create the first cursor, make a row, and insert it.&amp;nbsp; I make the second cursor, make a row, attempt to insert it, and I get the error "workspace already in transaction mode".&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While creating cursors in the new form is much faster (I measured 10X) it should still be faster to have all of the cursors I`m going to use created once rather than 50000 times.&amp;nbsp; I`m loading features in a random order from randomly ordered XML files.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 17:42:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350011#M27436</guid>
      <dc:creator>TimDine</dc:creator>
      <dc:date>2012-10-03T17:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can I have multiple open arcpy.da.InsertCursor at the same time?</title>
      <link>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350012#M27437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is this possible or do you have to delete one cursor before opening another?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;The &lt;A href="&amp;lt;/span&amp;gt;&amp;lt;a" target="_blank"&gt;arcpy.da.SearchCursor" rel="nofollow" target="_blank"&amp;gt;http://resources.arcgis.com/en/help/main/10.1/index.html#/UpdateCursor/018w00000014000000/]arcpy.da.SearchCursor&lt;/A&gt;&lt;SPAN&gt; doc says right up front:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Opening simultaneous insert and/or update operations on the same workspace using different cursors requires the start of an edit session.&lt;/BLOCKQUOTE&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 18:48:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350012#M27437</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-10-03T18:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can I have multiple open arcpy.da.InsertCursor at the same time?</title>
      <link>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350013#M27438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think if you are adding features from various sources into a single feature class, you only need one insert cursor running to handle the record insertion.&amp;nbsp; The source files would require individual search cursors to pull the information to be added by the insert cursor.&amp;nbsp; You would probably want some sort of loop to run through the input files that does the following: creates a search cursor, grabs some info, adds the gathered information via the insert cursor to your new feature class, and closes the search cursor.&amp;nbsp; But like a previous post said, apparently you can't open multiple insert/update cursors without and edit session being open.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 19:03:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350013#M27438</guid>
      <dc:creator>ClayPerry</dc:creator>
      <dc:date>2012-10-03T19:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can I have multiple open arcpy.da.InsertCursor at the same time?</title>
      <link>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350014#M27439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So I did miss that note, I see it right at the top of the arcpy.da.insertcursor documentation as well now.&amp;nbsp; In the mean time I managed to get an error about the feature class not being editable outside an edit session which got me onto an edit session for an unrelated reason.&amp;nbsp; I now have a far simplified chunk of code that gives me the same error.&amp;nbsp; "workspace already in transaction mode".&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

edit = arcpy.da.Editor(r'C:/Projects/GISPROD_ElectricDistribution_Extract.gdb')

edit.startEditing(False,False)

theIC = arcpy.da.InsertCursor(r'C:/Projects/GISPROD_ElectricDistribution_Extract.gdb/electric/servicepoint',['PHASEDESIGNATION', 'WORKORDERID', 'SUBTYPECD', 'PLACEMENTCONFIDENCE', 'SHAPE@'])
theIC.insertRow(['7', '280773', '1', '90', arcpy.Point(292840.72313, 4818098.69548)])

edit.stopEditing(False)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thoughts? There is a geometric network buried in there, but there are not objects that are not straight arcgis object classes that I am aware of.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:27:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350014#M27439</guid>
      <dc:creator>TimDine</dc:creator>
      <dc:date>2021-12-11T16:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can I have multiple open arcpy.da.InsertCursor at the same time?</title>
      <link>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350015#M27440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I believe it's data related.&amp;nbsp; I think I've got it sorted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Marking the original answer as correct.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2012 16:58:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350015#M27440</guid>
      <dc:creator>TimDine</dc:creator>
      <dc:date>2012-10-04T16:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can I have multiple open arcpy.da.InsertCursor at the same time?</title>
      <link>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350016#M27441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just FYI, I can't create and delete 3 insert cursors squentially without getting the following error. (Sequentially meaning that I'm creating and deleting the cursor before creating the next one).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;RuntimeError: workspace already in transaction mode&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Upon creating the third cursor and attempting to insertRow(), I get the error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It doesn't matter if I'm in the editing session or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can comment out any one of the 3 cursor insert blocks and the other 2 will work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using a with clause or cursor = ..., doesn't matter&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;with arcpy.da.InsertCursor('Points_Geom', ["PointID", 'SHAPE@XY']) as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.insertRow((123458, (4364181.91, 263840.13)))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;cursor = arcpy.da.InsertCursor('Points_Geom', ["PointID", 'SHAPE@XY'])
cursor.insertRow((123458, (4364181.91, 263840.13)))
del cursor&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:27:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350016#M27441</guid>
      <dc:creator>DouglasHall</dc:creator>
      <dc:date>2021-12-11T16:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can I have multiple open arcpy.da.InsertCursor at the same time?</title>
      <link>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350017#M27442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/96296-ArcSDE-FeatureClass-update-with-edit-session-problems"&gt;link&lt;/A&gt;&lt;SPAN&gt; as another possible solution to this error.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 13:27:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-i-have-multiple-open-arcpy-da-insertcursor-at/m-p/350017#M27442</guid>
      <dc:creator>PaulSchneider</dc:creator>
      <dc:date>2013-12-12T13:27:31Z</dc:date>
    </item>
  </channel>
</rss>

