Skip to main content
Question

Run Python script in FME


checcosisani
Contributor
Forum|alt.badge.img+12

Hi

 

I had to create a script to be able to webscrape a web page using Selenium. I would like to be able to launch the script from FME but I don't know how to do it.

If I share the script someone can help me ?

 

thx

 

Francesco

4 replies

hkingsbury
Celebrity
Forum|alt.badge.img+53
  • Celebrity
  • January 5, 2025

FME has the SystemCaller - https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Transformers/Transformers/systemcaller.htm

This can trigger an external application/script.

You could also embedded the complete Python logic in a PythonCaller.

 

The former is more of a fire and forget approach. You can have FME wait for it to finish but you don’t get much feedback/integration with the logic and output. The latter allows you to output results directly into FME. You have more comprehensive integration and overview of what the python is doing.


checcosisani
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • January 10, 2025

Hi,

Sorry i always forgot to mention that before write the post I always check the documementation but I'm not a programmer so I've asked help because I'm not able to run the script from fme

Thx

Francesco 


checcosisani
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • January 11, 2025

Hi

 

I copied in python caller my  script and this is the result

Aniy suggestion ?

thx

Francesco


hkingsbury
Celebrity
Forum|alt.badge.img+53
  • Celebrity
  • January 12, 2025

Selenium isn’t a standard Python Library included in FME, so you will need to install that:
https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Form/Workbench/Installing-Python-Packages.htm

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings