Copying item with the python API - index error?

86
2
01-22-2020 01:39 AM
Highlighted
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)
Reply
0 Kudos
2 Replies
Highlighted
Esri Esteemed Contributor

Hi Mathis,

Try the following tool:

https://community.esri.com/docs/DOC-13762-copy-content-between-portals 

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

Highlighted
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".

Reply
0 Kudos