Skip to main content
Question

Shutdown Python Script to retrieve the variable initiated on startup and write its value in the log file.

  • May 19, 2020
  • 2 replies
  • 40 views

a_afiaax
Contributor
Forum|alt.badge.img+2

Hello FME community, 

The attached Workbench is based on @david_r  Workbench "Retrieve a value from the Python startup script".

I added a Shutdown Python Script to retrieve the initiated global variable in startup and write its value in the Log File. 

I got the following error on Translation log:

PythonFactory failed to load python symbol `FeatureProcessor'
Factory proxy not initialized

I am using FME2018.1.1.1  WIN64 with 3.6 Python Compatibility.

Does anyone have any solution or other potential solutions to pass global variable from startup to Shutdown and write its value in the Log File?

 

Link for @david_r orginal Workbench:

https://knowledge.safe.com/questions/58082/passing-parameters-from-a-python-script-tool-to-a.html 

 

Regards,

Afia

@mark2atsafe @egomm12 @david_r @jlutherthomas @arnold_bijlsma @jdh @majdoleen @redgeographics @danilo_fme

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

david_r
Celebrity
  • May 19, 2020

Try setting "GetMyValue" as the function name to process features:

More info in the documentation: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/pythoncaller.htm


a_afiaax
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • May 19, 2020

Try setting "GetMyValue" as the function name to process features:

More info in the documentation: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/pythoncaller.htm

Thank you @david_r , it works well.