Having an issue that's been frustrating me for a few days. Trying to use the FeatureLayerCollection manager to overwrite a hosted table in Portal for ArcGIS 10.6.1 that was created from a CSV. The new CSV I am overwriting with has the same file name, field names, and field types, just new rows obviously.
Below is a snippet of my code along with the error:
from arcgis.gis import GIS
from arcgis.features import FeatureLayerCollection
portalurl = portalurl
username = adminusername
password = adminpassword
gis = GIS(portalurl,username,password)
outputCSV = r'C:\ItemViews\Test\COVID19_Items.csv'
flayer_collection = FeatureLayerCollection.fromitem(search_result)
Traceback (most recent call last):
File "C:\ItemViews\Query_GII_COVID19_Items_Publish2Portal.py", line 30, in <module>
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\managers.py", line 1197, in overwrite
lyr_url_info = "%s/layers" % feature_layer_item.layers.container._url
IndexError: list index out of range
Any idea why this error would be happening? Any help is truly appreciated since as you can see this is being used to monitor portal metrics related to the Coronavirus.