Skip to main content
Question

StoryMaps API in FME PythonCreator/PythonCaller

  • May 10, 2022
  • 2 replies
  • 34 views

quangu
Contributor
Forum|alt.badge.img+1

Hi!

Im looking for a way to import StoryMaps API to FME PythonCreator/PythonCaller. I have tried to import and read the following script:

"from arcgis.gis import GIS

from arcgis.gis import Item

from arcgis.apps.storymap.story import StoryMap

from arcgis.apps.storymap import Themes

from arcgis.apps.storymap.story_content import Image, TextStyles, Video, Audio, Embed, Map, Text, Button, Gallery, Swipe, Sidecar, Timeline"

 

When I read this script in PythonCreator/PythonCaller I got a message "Translation FAILED". The first two worked perfectly, but not the other three. Any ideas how i can work around?

 

Appreciate your help!

 

image1image2

2 replies

birgit
Influencer
Forum|alt.badge.img+21
  • Influencer
  • 131 replies
  • May 10, 2022

Hi Quangu,

 

Storymaps support has only really been implemented since basically this month. Maybe you are using an older arcgis module? Try this in a new python caller:

import arcgis
print(arcgis.__version__)

If the version is lower than 2.0.0 then you need to update ArcGIS Pro first to get this working.

 

Also I think the problem you have is caused by the final comma on line 9. You should not put a linebreak there. If you do want to do that it should be: , \  I think.


quangu
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • 5 replies
  • May 10, 2022

It actually worked, when I updated to 2.0.0!

Thank you so much!