Overwriting existing SD…
Traceback (most recent call last):
File "test.py", line 74, in <module>
fs = sdItem.publish(overwrite=True)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 7185, in publish
serviceitem_id = self._check_publish_status(ret, folder)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 7430, in _check_publish_status
raise Exception("Job failed.")
Exception: Job failed.
Can't seem to get past this error overwriting a SD on agol. Using update() and publish(overwrite=true). Have read a few other posts but no resolutions - possibly rolling back to Pro 2.1.
Anyone have a clue on how to get past this or any alternatives to overwrite a SD on agol?
I have a script that is overwriting 2 different SD's and then publishing them. The 1st publish always succeeds the second alway fails with exactly the same exception as OP. The only difference between the 2 SD's is that the one that succeeds is soured from a FC in a GDB the one that fails is sourced from a .shp
Check you don't have replicas present on the Feature Layers. If you do then they cause this exact error when trying to publish with overwrite=True. I'm not sure if the API explicitly checks for replicas as the job fails without a more meaningful error. The following thread might be of use How do I edit a feature layer's data when it has replicas .
I had a script that was overwriting an SD and running fine. I didn't run the script for a while and created a layer view of the SD layer during this time. Tried to run the script and couldn't figure out why it was failing. I ended up deleting the layer view and the script runs fine again.