Select to view content in your preferred language

When using to_featurelayer, getting an "Overwrite unsuccessful" error

188
2
10-24-2024 01:37 PM
SarahHurley1
Emerging Contributor

I am trying to publish a feature layer to AGOL through python. I have a script and have successfully done this many times with this script in the past few weeks. All of a sudden, I am getting an error that says "Exception: Overwrite unsuccessful. Check that editing capabilities are enabled on your service."

When this is happening, a File Geodatabase is published to my AGOL, which I can manually go click on and hit "Publish" and get the feature layer I was originally trying to get.

I've tested on a few different datasets (some from my local computer, also tried to grab a simple feature layer from AGOL and republish), but I am getting the same error every time. I have updated the arcgis module and all the modules I am using in my script currently (although this error came up before I did any updates).

Just wondering if anyone else has experienced this lately and/or if there are any solutions?

I am able to otherwise successfully pull in feature layers, truncate, update, etc. But just running into this issue when initially publishing?

 

feature_layer = census_map.spatial.to_featurelayer('Test')

 

 

Thanks in advance for any help or advice. 

 

0 Kudos
2 Replies
JosephHilliard94
Regular Contributor

Getting the same issue when publishing a service definition file I have uploaded

0 Kudos
StephaniePhillips-MG
Emerging Contributor

Sarah / Joseph - I just ran into this today - I have been using this snippet for months, and now all I get is the gdb and the failure - did you find a solution?  Thank you!

0 Kudos