Have an issue with Geoprocessing service while doing start editing for more than one user at same time.
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.
Enterprise geodatabase is versioned and editing is doing in SDE.Default. ArcGIS server version is 10.8
Please find the code snippets
eGeoDBWorkSpace = r"dbconnection.sde" #Enterprice geodatbase
edit = arcpy.da.Editor(eGeoDBWorkSpace)
edit.startEditing(True, True) -- *Error
inserCursor = arcpy.da.InsertCursor(polyFC,['ID',...., 'SHAPE@'])
for inRow in poly_insert_rows:
arcpy.AddMessage("MP to Temp FC finished")
inserCursor = arcpy.da.InsertCursor(plynFC,['ID',...., 'SHAPE@')
for inRow in plyn_boundary_insert_rows:
except Exception as err:
if 'edit' in locals():
*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.
Really appreciate the support to resolve this issue.
Solved! Go to Solution.
Thank you Davin for valuable input. Can we use arcpy.da.InsertCursor 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