1

I'm trying to overwrite an existing PDF ArcGIS Online item using ArcGIS API for Python.

props = {
    "type":"PDF",
    "title":file_name,
    "overwrite":True
    }

data = os.path.join(tempFolder, "{}.pdf".format(file_name))

gis.content.add(item_properties=props, data=data)

Returns

RuntimeError: Item already exists

1 Answer 1

0
props = {
    "type":"PDF",
    "title":file_name,
    "overwrite":True
    }

data = os.path.join(tempFolder, "{}.pdf".format(file_name))

item = gis.content.get('itemuniqueid')
item.update(item_properties=props, data=data)

More info can be found in the arcgis api reference reference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.