I've been tasked with cloning some items from one AGO to another AGO, and running into an issue, seemingly from features that have multiScaleGeometryInfo: True
I'm getting the IDs from the source AGO, passing them to the clone_items function
cloned_list = target_gis.content.clone_items(items=[source_item],folder="New Folder",search_existing_items=True)
After a lot of debugging, it seems that Feature Layers with no multiScaleGeometry will clone fine, but if they do have it, I get an error.
Has anyone encountered this, or this error before?
('Failed to create Feature Service FEAUTRE_LAYER: list index out of range', <Item title:"FEAUTRE_LAYER" type:Feature Layer Collection owner:newowner>)
I had help tracing this error down to the _clone.py script, line 2753 "layers[layer_id].container.manager.layers[layer_id].update_definition.
With the debugger running, the layer_id showed 156 when hovering over it (which was the correct layer ID from the service) but in the variables window, it showed that 0. So it seems like that is the issue?
Not entirely sure how to go about fixing that.