<?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: Geoprocessing service editing issue with arcpy.da.Editor in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1081829#M25689</link>
    <description>&lt;P&gt;could you format your code to facilitate syntax errors&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank"&gt;Code formatting ... the Community Version - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jul 2021 16:43:14 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-07-22T16:43:14Z</dc:date>
    <item>
      <title>Geoprocessing service editing issue with arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1081823#M25688</link>
      <description>&lt;P&gt;Have an issue with Geoprocessing service while doing start editing for more than one user at same time.&lt;/P&gt;&lt;P&gt;Input for Geoprocessing service is CAD drawing file(dgn/dwg) from web application. and Geoprocessing code is inserting the features to appropriate feature classes in enterprise geodatabase.&lt;/P&gt;&lt;P&gt;Enterprise geodatabase is versioned and editing is doing in SDE.Default. ArcGIS server version is 10.8&lt;/P&gt;&lt;P&gt;Please find the code snippets&lt;/P&gt;&lt;P&gt;eGeoDBWorkSpace = r"dbconnection.sde" #Enterprice geodatbase&lt;BR /&gt;----&lt;BR /&gt;edit = arcpy.da.Editor(eGeoDBWorkSpace)&lt;BR /&gt;try:&lt;BR /&gt;edit.startEditing(True, True) -- &lt;STRONG&gt;*Error&lt;/STRONG&gt;&lt;BR /&gt;edit.startOperation()&lt;BR /&gt;inserCursor = arcpy.da.InsertCursor(polyFC,['ID',...., 'SHAPE@'])&lt;BR /&gt;for inRow in poly_insert_rows:&lt;BR /&gt;inserCursor.insertRow(inRow)&lt;BR /&gt;del inserCursor&lt;BR /&gt;arcpy.AddMessage("MP to Temp FC finished")&lt;BR /&gt;inserCursor = arcpy.da.InsertCursor(plynFC,['ID',...., 'SHAPE@')&lt;BR /&gt;for inRow in plyn_boundary_insert_rows:&lt;BR /&gt;inserCursor.insertRow(inRow)&lt;BR /&gt;del inserCursor&lt;BR /&gt;-------&lt;BR /&gt;-----&lt;BR /&gt;edit.stopOperation()&lt;BR /&gt;edit.stopEditing(True)&lt;BR /&gt;except Exception as err:&lt;BR /&gt;#arcpy.AddError(err)&lt;BR /&gt;if 'edit' in locals():&lt;BR /&gt;if edit.isEditing:&lt;BR /&gt;edit.stopOperation()&lt;BR /&gt;edit.stopEditing(False)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;*Error :&lt;/STRONG&gt; Getting error on this line , If editing started by one user request, between any other request came to the server.The new request will fail.&lt;/P&gt;&lt;P&gt;Really appreciate the support to resolve this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 16:38:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1081823#M25688</guid>
      <dc:creator>SreejithSreenivasan</dc:creator>
      <dc:date>2021-07-22T16:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service editing issue with arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1081829#M25689</link>
      <description>&lt;P&gt;could you format your code to facilitate syntax errors&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank"&gt;Code formatting ... the Community Version - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 16:43:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1081829#M25689</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-07-22T16:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service editing issue with arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1081836#M25690</link>
      <description>&lt;LI-CODE lang="python"&gt;//Start
eGeoDBWorkSpace = r"dbconnection.sde" #database connection
----
-----
edit = arcpy.da.Editor(eGeoDBWorkSpace)
try:    
	edit.startEditing(True, True)    #*Error : Getting error on this line , If editing started by one user request, between any other request came to the server.The new request will fail.           
	edit.startOperation()
	inserCursor = arcpy.da.InsertCursor(polyFC,['ID',...., 'SHAPE@'])
	for inRow in poly_insert_rows:
		inserCursor.insertRow(inRow)
	del inserCursor
	arcpy.AddMessage("MP to Temp FC finished")
	inserCursor = arcpy.da.InsertCursor(plynFC,['ID',...., 'SHAPE@')
	for inRow in plyn_boundary_insert_rows:
		inserCursor.insertRow(inRow)
	del inserCursor		
-------
-----
	edit.stopOperation()		
	edit.stopEditing(True)		
except Exception as err:              
	if 'edit' in locals():  
		if edit.isEditing:  			
			edit.stopOperation()  			                  
			edit.stopEditing(False)	
------
------
arcpy.ClearWorkspaceCache_management()

//End&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 22 Jul 2021 16:52:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1081836#M25690</guid>
      <dc:creator>SreejithSreenivasan</dc:creator>
      <dc:date>2021-07-22T16:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service editing issue with arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1081896#M25691</link>
      <description>&lt;P&gt;I suspect you are using a connection file to connect to your Enterprise Geodatabase.&amp;nbsp; You need to give the complete path to that connection file.&amp;nbsp; I use a connection file this way in python:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ws = r'\\complete path\to my\connection file\ConnectionFileName.sde'
edit = ws&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 22 Jul 2021 18:24:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1081896#M25691</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-07-22T18:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service editing issue with arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1081904#M25692</link>
      <description>&lt;P&gt;Hi JoeBorgione,&lt;/P&gt;&lt;P&gt;I am providing complete shared path. While doing the post I just modified the path. FYI,Code is working fine with single request at a time. Only problem is when there is concurrent users trying to edit the feature class.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 18:34:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1081904#M25692</guid>
      <dc:creator>SreejithSreenivasan</dc:creator>
      <dc:date>2021-07-22T18:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service editing issue with arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1081916#M25694</link>
      <description>&lt;P&gt;Is the data versioned?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 18:47:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1081916#M25694</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-07-22T18:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service editing issue with arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1082062#M25696</link>
      <description>&lt;P&gt;I have run into a similar issue when trying to editing using an .sde.&lt;/P&gt;&lt;P&gt;Are you getting an error like this "&lt;SPAN&gt;The version has been redefined to reference a new database state"?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A solution is to&amp;nbsp;&lt;/SPAN&gt;edit a feature service instead? Publish the CAD drawing as a branched versioned dataset and edit that. You won't have to use edit.startEditing,&amp;nbsp;&lt;SPAN&gt;edit.startOperation()&lt;/SPAN&gt; workflow because the database editing will be taken care of by the ArcGIS Software.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 05:47:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1082062#M25696</guid>
      <dc:creator>DavinWalker2</dc:creator>
      <dc:date>2021-07-23T05:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service editing issue with arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1082114#M25700</link>
      <description>&lt;P&gt;Yes.It is versioned.I am editing in sde.default itself&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 10:33:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1082114#M25700</guid>
      <dc:creator>SreejithSreenivasan</dc:creator>
      <dc:date>2021-07-23T10:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service editing issue with arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1082345#M25707</link>
      <description>&lt;P&gt;Hi DavinWalker2,&lt;/P&gt;&lt;P&gt;Yes. While running in desktop I am getting the same error message you have mentioned. But once I published as the geoprocessing service I am getting exception message as&amp;nbsp; "error return without exception set"(If there is concurrent requests).&lt;/P&gt;&lt;P&gt;Would like to know few more details about your solution.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;A solution is to edit a feature service instead?&lt;/EM&gt; So your suggestion is consume feature service inside my geoprocessing code. If we use feature service, Does the data update become transactional if we use feature service? Means I have 5 different feature class inserts required per request, if any one of the feature class update failed I would like to rollback all the other update happened on that request.&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Branched versioned dataset?&lt;/EM&gt; I didn't use this before, Does it required Portal also. In my current&amp;nbsp; environment we have&amp;nbsp;ArcGIS server and Desktop only.&lt;/LI&gt;&lt;LI&gt;Does this mean that concurrent editing is not possible using arcpy.da.Editor in geoprocessing?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Please note that we are consuming this geoprocessing from ArcGIS JS API application. To immediately show the drawing file geometries over the base map with appropriate layer name and&amp;nbsp; symbology.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 20:20:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1082345#M25707</guid>
      <dc:creator>SreejithSreenivasan</dc:creator>
      <dc:date>2021-07-23T20:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service editing issue with arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1082595#M25717</link>
      <description>&lt;P&gt;&lt;EM&gt;A solution is to edit a feature service instead?&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp; -&amp;nbsp;Yes, I'm suggesting to use a feature service. You could just use the arcpy.da.InsertCursor and each row would be inserted independently.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;Branched versioned dataset? - &lt;/EM&gt;Sorry disregard if you do not have ArcPro and Portal.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Does this mean that concurrent editing is not possible using arcpy.da.Editor in geoprocessing? -&amp;nbsp;&lt;/EM&gt;I have not been able to get it to work correctly. this post also mentions the same or similar issue&amp;nbsp;&lt;A href="https://community.esri.com/t5/python-questions/multi-user-editing-in-arcpy/td-p/41607" target="_blank"&gt;https://community.esri.com/t5/python-questions/multi-user-editing-in-arcpy/td-p/41607&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you can figure out a workflow that best suits your requirements from the information I have provided.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 04:01:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1082595#M25717</guid>
      <dc:creator>DavinWalker2</dc:creator>
      <dc:date>2021-07-26T04:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service editing issue with arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1082661#M25721</link>
      <description>&lt;P&gt;Thank you Davin for valuable input. Can we use&amp;nbsp;&lt;SPAN&gt;arcpy.da.InsertCursor&amp;nbsp; with Feature service in arcpy with ArcGIS server (means without ArcGIS Pro) .Or we need to use apply edits to feature layer using python "urllib" libraries by making http calls with json input&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 13:27:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1082661#M25721</guid>
      <dc:creator>SreejithSreenivasan</dc:creator>
      <dc:date>2021-07-26T13:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service editing issue with arcpy.da.Editor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1082824#M25723</link>
      <description>&lt;P&gt;Hi Sreejith,&lt;/P&gt;&lt;P&gt;I have been successful using arcpy.da.InsertCursor with a Feature Service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 21:14:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-editing-issue-with-arcpy-da/m-p/1082824#M25723</guid>
      <dc:creator>DavinWalker2</dc:creator>
      <dc:date>2021-07-26T21:14:14Z</dc:date>
    </item>
  </channel>
</rss>

