4

I get a generic error "Job Failed" when using the below code to try and overwrite a feature layer on ArcGIS Online:

shp_fp = 'E:\folder\shapefile.shp'
feat_id = 'q3p094rupqe9vntowe98w98eyt0w'

item = gis.content.get(feat_id)
fs = item.layers[0]
fs.manager.overwrite(shp_fp)

I have editing privileges for the feature service. The service can be updated via ArcGIS Pro using "sharing" - "overwrite web layer" but programmatically it throws an error.

1 Answer 1

1

This error message is generally received when you attempt to overwrite a service that has had its name changed in ArcGIS Online after publishing. For example, if I publish a service with the name 'A', change the name to 'B', and attempt to overwrite the service using a zipped file geodatabase/shp called 'C', the overwrite will fail.

Try this:

The overwrite will succeed if either the data being used to overwrite (eg a file geodatabase) or the service in ArcGIS Online has the same name as the original service. For example, If we publish a service with the name 'A', change the name to 'B', and attempt to overwrite the service using a zipped file geodatabase/shp called 'A', the overwrite will succeed.

You can find the original name of the service by navigating to the REST endpoint of the service in question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.