Copying item with the python API - index error?

01-22-2020 01:39 AM
New Contributor II

Im trying to copy a feature service from one AGOL account to another. The name is unique. When using the pyton API Im getting the error:

Unable to add feature service definition.
The operation failed because an index or statistics with name 'Tennpunkt_nummer_unidx' already exists on table 'db_4868.user_4868.Gatelys_Webmap_WFL1_TENNPUNKT'.

I've tried cloning to different accounts but I always get the same error. This worked fine last year in October/November. I've tested using the arcgis api 1.62 and 1.7, with the same result. 

Im using GIS.content.clone_items() and have tested with copy_date=True and False. 

Any help or advice is appreciated! 

Tags (1)
0 Kudos
4 Replies
Esri Esteemed Contributor

Hi Mathis,

Try the following tool: 

The Copy Services and Copy File Based Items tools will work for ArcGIS Online, however, the Copy Maps and Applications tool will not. 

New Contributor II

Hi Jake,
I get the same error using this tool. I see in the code that the cloning is also done using "content.clone_items".

0 Kudos
New Contributor

Hi Mathis,

Just wondering if you managed to solve this issue, I am getting the same '_unidx' already exists error message when trying to clone content.

0 Kudos
New Contributor III

Any update on this?  We are having the same problem cloning a feature service.

0 Kudos