Arcpy InsertCursor not working for feature service with update to ArcGIS Pro 2.5

693
1
02-18-2020 12:08 PM
MollyMoore
Occasional Contributor

I'm continuing to have issues with previous functionality not working after the update to Pro 2.5. I'm trying to use arcpy.da.InsertCursor() to insert features into a feature service feature layer. This is something that I did fairly frequently without problems prior to the update. After the update to Pro 2.5, I am getting the following error:

RuntimeError: ERROR: code:500, Unable to complete operation., Unable to perform applyEdits operation., An error occurred., Internal server error.

I am attempting to insert into a feature service layer that is in a project in ArcGIS Pro. I'm able to edit, create, delete fine in the feature service manually. An example of the code I'm trying to run is below:

values = [refcode,geom]
fields = ["refcode","SHAPE@"]
with arcpy.da.InsertCursor(elem_poly,fields) as cursor:
    cursor.insertRow(values)‍‍‍‍‍‍‍‍

Any ideas about what I should be doing differently?

0 Kudos
1 Reply
JoeBorgione
MVP Emeritus

Has there been any changes to the service itself?  Can it be a permissions issue, such that your creds aren't being passed correctly?  Just tossing these up and seeing what sticks.....

That should just about do it....
0 Kudos