AnsweredAssumed Answered

FeatureLayerCollectionManager references a missing function in overwrite()

Question asked by Hakon.Dreyergeodata-no-esridist Employee on Jun 5, 2018
Latest reply on Feb 7, 2019 by deleted-user-Qrnw90viByMg

After publishing a hosted service based on a gdb we would like to regulerly update the service using the overwrite functionality in Python API 1.4.1.

 

This works fine if the service resides in AGOL, but when trying the same in Portal the API throws an error. Apparently the FeatureLayerCollectionManager calls an unimplemented method: _overwrite_portal.

Traceback (most recent call last):
  File "c:\test\overwrite.py", line 19, in <module>
    _fcoll.manager.overwrite(_data)
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\managers.py", line 1030, in overwrite
    return self._overwrite_portal(data=data_file)
AttributeError: 'FeatureLayerCollectionManager' object has no attribute '_overwrite_portal

 

In managers.py this is implemented as this, which also explains the difference between AGOL and Enterprise:

Outcomes