I usually call manager.overwrite with a portal item. Is there any reason this is no longer supported?
if data_file and (
not isinstance(data_file, str)
or not os.path.exists(data_file)
or not os.path.isfile(data_file)
):
raise ValueError(
"The data file provided does not exist or could not be accessed."
)