Skip to main content

I am experimenting with a new workbench that has python startup and shutdown scripts. Everything seems to be running successfully. I'm using FME 2021 as I need 32-bit capabilities for ESRI. After the workbench is done, I'm calling a python script that runs a series of SQL queries. The script finishes and FME says "Translation was SUCCESSFUL". However, the workbench is still running and I have to manually click the Stop button. Any thoughts?imageimage

Hello @mlauer​ 

It would be good to try to narrow down which part of the workspace is causing the behaviour ("Translation was SUCCESSFUL" in log but Workbench is still "running").

For example, if you remove either the Python startup or shutdown scripts, does Workbench still continue running? If so, then the culprit may be one of the readers/writers/transformers in your workspace.


Hello @mlauer​ 

It would be good to try to narrow down which part of the workspace is causing the behaviour ("Translation was SUCCESSFUL" in log but Workbench is still "running").

For example, if you remove either the Python startup or shutdown scripts, does Workbench still continue running? If so, then the culprit may be one of the readers/writers/transformers in your workspace.

Thank you for your reply. I've done some testing but I'm more confused than before.

 

  • The initial workbench, with startup/shutdown Python scripts, will hang at the end. It says "Translation Successful" but never actually stops.
  • I removed the Startup Python Script and Shutdown Python Script, and the workbench completes and stops successfully. I didn't have to click the Stop button myself.
  • Going the other direction, I cut out everything in the workbench and went to a simple setup. Read one table and write it to another table in the same DB. No other transformers. I kept the Python scripts in place. This also ran successfully and stopped on its own.

 

I'm having trouble determining if python is the issue. I've used FME for several years, this is the first time I've seen this behavior and also the first time I'm embedding python scripts. It's more of an annoyance than a major issue. This workbench would only get used by my team, and I can easily include a note about stopping it manually.

 

 

 


Thank you for your reply. I've done some testing but I'm more confused than before.

 

  • The initial workbench, with startup/shutdown Python scripts, will hang at the end. It says "Translation Successful" but never actually stops.
  • I removed the Startup Python Script and Shutdown Python Script, and the workbench completes and stops successfully. I didn't have to click the Stop button myself.
  • Going the other direction, I cut out everything in the workbench and went to a simple setup. Read one table and write it to another table in the same DB. No other transformers. I kept the Python scripts in place. This also ran successfully and stopped on its own.

 

I'm having trouble determining if python is the issue. I've used FME for several years, this is the first time I've seen this behavior and also the first time I'm embedding python scripts. It's more of an annoyance than a major issue. This workbench would only get used by my team, and I can easily include a note about stopping it manually.

 

 

 

Hello @mlauer​ 

Thanks for sharing your test results. It seems there could be some interaction between the workspace's reader/writers and transformers that is causing the hang behaviour.

I see there is a mention of SDE connection files in the log. Does the main workspace have geodatabase formats and/or HTTPCallers? Are you calling the arcpy module in the startup and/or shutdown scripts? The behaviour seems similar to this Esri thread.

If you're determined to find the root cause of this behaviour, you could try commenting out all the lines in Python scripts except for the first line and running the workspace. If the hang behaviour does not appear, uncomment the second line and run workspace again, etc.


Thank you for your reply. I've done some testing but I'm more confused than before.

 

  • The initial workbench, with startup/shutdown Python scripts, will hang at the end. It says "Translation Successful" but never actually stops.
  • I removed the Startup Python Script and Shutdown Python Script, and the workbench completes and stops successfully. I didn't have to click the Stop button myself.
  • Going the other direction, I cut out everything in the workbench and went to a simple setup. Read one table and write it to another table in the same DB. No other transformers. I kept the Python scripts in place. This also ran successfully and stopped on its own.

 

I'm having trouble determining if python is the issue. I've used FME for several years, this is the first time I've seen this behavior and also the first time I'm embedding python scripts. It's more of an annoyance than a major issue. This workbench would only get used by my team, and I can easily include a note about stopping it manually.

 

 

 

I think this thread fits more closely, and it's one of the only mentions I've found through googling. I didn't get a solution out of it, but it does mention the use of SQL (we've been using SQL and FME for a decade now).

 

https://community.safe.com/s/question/0D54Q000080hfZeSAI/translation-successful-but-process-keeps-running

 

The python scripts use arcpy, and arcpy.SQLExecute() to run queries against the .SDE connection. And yes, it's an ESRI geodatabase. It feels like something isn't finishing or closing at the end.

 

I'll continue to test as a time allows. I agree that changing my Python stuff to a simple "dummy" script is a good idea.


Reply