Issues copying storymap to another organization

535
3
01-11-2023 04:17 PM
Labels (1)
CassandraFollett
New Contributor III

Hello,

I've been trying to follow this guide:

https://developers.arcgis.com/python/samples/clone-storymap-version2/

At Step 2 I've been getting an index error and I can't figure out why. I checked that all layers and webmaps have the right permissions to be accessed but that doesn't seem to be the issue. Please see screenshot. It says 'list index out of range'. When I check webmap_to_copy it does have the items. Any idea what is causing this?

0 Kudos
3 Replies
NoahParavicini
New Contributor

Hi Cassandra, have you tried just calling clone_items() on the StoryMap item itself? It should automatically clone all of the WebMaps within the StoryMap itself. Like so:

dest_gis.content.clone_items([your_storymap])

The WebMaps that are part of the StoryMap should show up in your target organization's content.

Let me know if that works!

0 Kudos
CassandraFollett
New Contributor III

Can you explain more what you mean? Do you mean following a different set of instructions or substituting this as a command in one of the steps?

0 Kudos
NoahParavicini
New Contributor

I'm not sure how old this guide is, but I believe our clone_items() method should do most, if not all of the steps included in that guide, implicitly.

I would try just grabbing your storymap object with:

story = source_gis.content.get("your_itemid")

and then trying to clone that across to your destination gis with:

dest_gis.content.clone_items([story])

That should clone the storymap and all of it's associated content, data, etc. with it. You can double check by accessing the item in your portal, or getting the cloned storymap object in your notebook and examining the properties.

0 Kudos