Hey all,
I am attempting to use a Python script in ArcGIS Pro to overwrite a feature layer in AGOL. I want to use this script so that updates will be uploaded to AGOL nightly. I'm a newb when it comes to programming. I got this script from Kevin Himba (https://www.esri.com/arcgis-blog/products/api-python/analytics/updating-your-hosted-feature-services...)
I am currently getting an error code:
"ERROR 001272: Analyzer errors were encountered ([{"code":"00102","message":"Map does not contain a required layer type for web feature layer","object":"Recreation Asset Inventory"}]).
Failed to execute (StageService)."
One strange thing about the error is that the "Recreation Asset Inventory" is not even part of the script or the project I'm working in. It's a completely different feature layer.
Any ideas on how to proceed?
Thanks !
Josh
For any one got the same error message, I figured out the reason for my case is that layers I am trying to publish are newly created and didn't get saved. A simple call of aprx.save() solves my problem.
Saving the map also worked for me. Not sure why but sometimes it would work and not others.
No changes to code, files, layers and so forth.
Oh well it works now.