When trying to overwrite a web layer with a feature in a GDB via a python script I get the error bellow
-- ValueError: The data file provided does not exist or could not be accessed. --
The problem matches BUG-000172631 although Esri has that error as Status: Non-Reproducible.
Anyone use this or a similar workflow and have any advice? Thanks!
import arcpy
from arcgis.gis import GIS
from arcgis.features import FeatureLayerCollection
arcpy.env.overwriteOutput = True
# Variables
itemid_roads = '4377ec12e886476ab96ce71ce59d3f60'
#Log into AGOL
gis = GIS('pro')
me = gis.users.me
print ("Signed in as: " + str(me))
#Overwrite Hosted Feature Layer
OutputGDB = "//nwshfp01/lidar/geodb/agol_features.gdb/"
newname = (OutputGDB + "Roads_CL_")
dataitem = gis.content.get(itemid_roads)
flayercol = FeatureLayerCollection.fromitem(dataitem)
flayercol.manager.overwrite(newname)