Hi there - cannot save storymap as cannot identify storymap version from endpoint (behind firewall) - need to hard code sm_version in code base.
File ~/local/venv/lib/python3.11/site-packages/arcgis/apps/storymap/_utils.py:198, in save(story, title, tags, access, publish)
195: story._item.resources.update(file=temp.name, file_name=draft)
197: # get storymap version from endpoint
--> 198: sm_version = story._gis._con.get("https://storymaps.arcgic.com/version")["version"]
Solved! Go to Solution.
@atmosfairy Thank you for the clarification. I passed along the issue to the python api team, and this will be fixed in the next python api release.
For now, please continue to hard code the value in your current environment
Hi @atmosfairy , any reason your are accessing the item information directly in this use case?
From the code snippet it seems like you might be trying to change the draft information for the story, and then trying to update it.
If you want to access the draft information for the story it should be available in the story._properties attribute. If you make your changes there you can just use story.save() to save those draft changes. I am not aware of any issues with the built in .save() method.
Sorry - should have included preceding traceback. Occurs when:
new_sm.save()
But if I modify _utils.py to this:
198 #sm_version = story._gis._con.get("https://storymaps.arcgis.com/version")["version"]
199 sm_version = "9.2"
I can save successfully.
@atmosfairy Thank you for the clarification. I passed along the issue to the python api team, and this will be fixed in the next python api release.
For now, please continue to hard code the value in your current environment