mbhansen

ApplyEdits followed by arcpy.da.UpdateCursor

Discussion created by mbhansen on Dec 12, 2012
Latest reply on Dec 13, 2012 by mbhansen
I have a geoprocessing tool (python script) published to an ArcGIS server 10.1. It updates some features in a feature class.

The tool works fine, except from if I run the tool after I have edited data in the same feature class using the javascript editor widget (and the standard applyEdits method of the feature service).

I am using a versioned feature class with archiving enabled.

The problem occurs when the python script tries to update data (in the same feature class):
with arcpy.da.Editor(wp) as edit:
  with arcpy.da.UpdateCursor(wp,.... ) as updateCursor:
      ....
      updateCursor.updateRow(row)


If I restart the feature service and my geoprocessing service in the ArcGIS Server Manager, I can run the tool successfully again.

I am using the SDE.DEFAULT version.

Hope you help me fix the problem? (or explain the reason)

Outcomes