Select to view content in your preferred language

Nightly Publishing Script Failed and Layers Have Disappeared

181
0
05-14-2024 06:32 AM
Labels (2)
RobertAnderson3
MVP Regular Contributor

We run a nightly Python script uploading feature layers to ArcGIS Online, overwriting the existing ones to keep our online data up to date. These have all worked regularly for some time, minor issues here and there but no major issues.

This morning we discovered some had worked, some had not updated, and at least one had ended up just not existing anymore (Sewer). The script is just running out of the box publishing tools from ArcGIS Pro, so I don't believe it's on our side that would cause an issue like this.

Trying to publish Zoning manually this morning we received an error Error code: 400 Description: Bad syntax in request. Message: Unable to delete item. This service item has a related Service item and since then, without any changes the manual publish worked fine. This layer still existed, but was not updated.

Trying to run our script we received the ever helpful ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds.
Failed to execute (UploadServiceDefinition).

For the Sewer layer, the Service Definition had been updated, but the feature layer had disappeared. As a trial we deleted the SD and then re-ran the script just to upload that one and it worked. Then we did the Zoning publish, so we decided to try running the script for all of our layers and it has run with no issues, despite no changes.

I noticed that since the sewer layer was republished, all of the maps where it was before show the layers again, but if I try opening the source feature layer from the web map it tells me The item you requested cannot be found. The item may have been deleted or you may have entered an incorrect URL. and if I open the layer from my Content page, the itemID is different from where the web map sends me.

Has anyone run into this kind of issue before? Notably the one where the layer was entirely gone as that's a major mess up. Is that something wrong with our script, or was there an AGOL blip overnight that we got caught up in?

0 Kudos
0 Replies