Skip to main content
Solved

Python print command not showing on translation log

  • January 20, 2020
  • 1 reply
  • 34 views

Forum|alt.badge.img

Hi, I am trying to print certain things while running a python code through python caller! I found it was working earlier but suddenly I do not get any print command except if i just do a print and no other code is present. Can anybody help?

Best answer by jovitaatsafe

Hi @fmeuser2020,

Thanks for your question! I only learned this recently myself to be honest, but it looks like the print command only writes into the log window, but not to the logfile. This article on Logging With Python Scripts might be helpful to take a look at as it shows what you can add to your script to get the message written into the logfile. Hope that helps!

 

 

Update: There are some new changes with recent versions as to the behavior of logging print statements. Can I ask what version and build of FME you are using? And you mentioned it was working before but stopped working, can you elaborate a bit more on that? Were there changes to your workspace, and does your translation complete successfully? Also what is your python interpreter version set to?
View original
Did this help you find an answer to your question?

1 reply

jovitaatsafe
Safer
Forum|alt.badge.img+11
  • Safer
  • Best Answer
  • January 20, 2020

Hi @fmeuser2020,

Thanks for your question! I only learned this recently myself to be honest, but it looks like the print command only writes into the log window, but not to the logfile. This article on Logging With Python Scripts might be helpful to take a look at as it shows what you can add to your script to get the message written into the logfile. Hope that helps!

 

 

Update: There are some new changes with recent versions as to the behavior of logging print statements. Can I ask what version and build of FME you are using? And you mentioned it was working before but stopped working, can you elaborate a bit more on that? Were there changes to your workspace, and does your translation complete successfully? Also what is your python interpreter version set to?

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