Question

Shutdown Python Script not executing for a Failed Translation


Badge +5

The article on shutdown scripts states A shutdown script runs after all of the transformers, readers, writers, and the log file are closed in a successful translation. In the case of a failed translation, the script will still execute but may fail as only fme.status and fme.failureMessage are guaranteed to contain valid values.

I have a FME Workspace that has a "Translation FAILED" message.  The last three lines of the Translation Log are:

Program Terminating
Translation FAILED.
Warning: not all FMESessions that were created were destroyed before shutdown.  This may cause instability

Testing that I have done indicate that the FME Python Shutdown Script is not being executed.  I assume this is because some FMESessions are still open.  As part of testing I have removed the import or use of any FME related python library from my Python Shutdown Script, and, have tested this script on other workspaces.   Is there anyway to force the FME Python Shutdown Script to run when the Translation has Failed, but, not FMESessions are destroyed?


2 replies

Userlevel 3
Badge +13

Hello @philipwhitten​ , what version of FME are you currently using? Also, which version of the Python interpreter is being used? Best, Kailin.

Badge +5

Hello @philipwhitten​ , what version of FME are you currently using? Also, which version of the Python interpreter is being used? Best, Kailin.

We are using FME Desktop 2020.1 with Python 3.7.

Reply