Skip to main content

Hi,

I've added a Python script to be run in a workspace after the translation finishes. I.e. the "FME_END_PYTHON_ENC" tag in the FME file.

I can see that it hasn't been run (by other means), but I can't find neither the above tag nor keywords from the script mentioned anywhere in the translation log file.

How can I determine if the shutdown script has been run or not (if I can't determine it by other means) ?

If it errs, I would like to see some error messages, so I can correct it.

Cheers

 

Lars I.

Hi @lifalin2016, since shutdown process will be executed after closing the log file, FME won't save anything about the shutdown process into the log file by default. However, you can get the log file path in the shutdown script through a global variable, so you can re-open the log file in the script and append something to the file.

This article contains a simple example: Logging with Python scripts


Thanks Takashi.

You cleared that up for me.

As it turned out, I ended up running my code in a PythonCaller in a test workspace, which allowed me to log the exception error message. After some fooling around, I finally found the reason for the exception being thrown, and found a remedy.

It now works, I hope :-)

Cheers

 

Lars I

Thanks Takashi.

You cleared that up for me.

As it turned out, I ended up running my code in a PythonCaller in a test workspace, which allowed me to log the exception error message. After some fooling around, I finally found the reason for the exception being thrown, and found a remedy.

It now works, I hope :-)

Cheers

 

Lars I
I haven't implement the logging as yet, but will look into it eventually, I'm sure.

 

 


Reply