Problem:
The following error is received when running script 12. Update hosted Feature Layer (AGOL) with Biotics IDs (Observations) within the Observations Toolbox:
Traceback (most recent call last):
File "C:\Users\whitney_weber\Documents\ArcGIS\Projects\MyProject\Observations.atbx\UpdateObsFeatureLayer.tool\tool.script.execute.py", line 85, in <module>
File "C:\Users\whitney_weber\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\Lib\site-packages\arcgis\features\managers.py", line 3700, in add_to_definition
res = self._con.post(u_url, params)
Cause:
The script is trying to add fields to the feature layer but is prevented by the existence of views created from the feature layer, as highlighted in the screenshot below:
Solution:
Delete the views, including from the Recycle Bin!