Solved

FME @Python could not obtain a session object Requested STA Command not found: Python

  • 23 August 2018
  • 8 replies
  • 5 views

Badge

FME Server 2018.1 - Build 18520 - linux-x64 (on FME Cloud)

Workspaces loaded with FME Desktop 2018.1.0.1 (20180730 - Build 18528 - WIN64)

Python Compatibility Scripting : Pyton 3.4+

Apologies for the way the question is elaborated but I really do not known where this error in FME server is coming from and how to describe it (I googled it and I can't seem to find any reference)

It is incosistent, it appears on workspace execution and the job fails (at the end) but if the job is rerun (same workspace) everthing works fine, then it may appear and disappear again.

 

It appears in workspaces that do not have any python transformer neither start-up shut-down scripts.

Could anyone help?

Thanks

icon

Best answer by hollyatsafe 31 January 2019, 18:52

View original

8 replies

Badge

Hi @alex_chris

Can you try to publish the workspaces to FME Server with an FME Desktop version of the same build as FME Server (18528) or upgrade the FME Server on FME Cloud to build 18258 and retry to run the workspaces? Since you are using a newer build to author & publish the workspaces there is no guarantee that you are not using a functionality of FME that is not available in the version of FME Server that you are using.

Please let us know how this goes!

Userlevel 4
Badge +26
Hi @alex_chris,

 

 

Have you got any update on this? I'm seeing the same error with FME Server 2018.1.

 

Python version 2.7.

 

Ours is also inconsistent. In the cases where it works I can see the following line near the top of the log:

 

|INFORM| Using Python interpreter from `C:\Program Files\FMEServer\Server\fme\fmepython27\python27.dll' with PYTHONHOME `C:\Program Files\FMEServer\Server\fme\fmepython27'
|INFORM| Python version 2.7 loaded successfully
When it fails those lines aren't present. This makes me think it's somehow liked to the python interpreter? @GerhardAtSafe - any other ideas. 

 

I know in FME 2018.1 on desktop I see a warning about 2.7 python support being reduced. Any chance this is related?
Badge
Hi @alex_chris,

 

 

Have you got any update on this? I'm seeing the same error with FME Server 2018.1.

 

Python version 2.7.

 

Ours is also inconsistent. In the cases where it works I can see the following line near the top of the log:

 

|INFORM| Using Python interpreter from `C:\Program Files\FMEServer\Server\fme\fmepython27\python27.dll' with PYTHONHOME `C:\Program Files\FMEServer\Server\fme\fmepython27'
|INFORM| Python version 2.7 loaded successfully
When it fails those lines aren't present. This makes me think it's somehow liked to the python interpreter? @GerhardAtSafe - any other ideas. 

 

I know in FME 2018.1 on desktop I see a warning about 2.7 python support being reduced. Any chance this is related?
Hi @virtualcitymatt, can you attach a full log file with the error message? I also assume that in your case the machine is running on windows and there is no difference in the build of FME Server & Desktop?

 

One thing to check could be the Python Compatibility parameter. Is it similar for all jobs that are failing? This could at least give away if it's related to this. You can also check in the fmeprocesingmonitor.log file if you see messages reporting a python mismatch. This is usually expected if you run workspaces requiring different python versions, but it could be another hint.

 

Userlevel 4
Badge +26

I've changed the workspace to be compatible with both Python 3 or Python 2.7. If it was a problem with the engine and the python version being loaded then this should solve the problem. Note that the Desktop version which uploaded to the server was a few builds ahead of the Server build. So I can't say that the difference in FME version was not the root of the problem.

Badge
Hi @alex_chris,

 

 

Have you got any update on this? I'm seeing the same error with FME Server 2018.1.

 

Python version 2.7.

 

Ours is also inconsistent. In the cases where it works I can see the following line near the top of the log:

 

|INFORM| Using Python interpreter from `C:\Program Files\FMEServer\Server\fme\fmepython27\python27.dll' with PYTHONHOME `C:\Program Files\FMEServer\Server\fme\fmepython27'
|INFORM| Python version 2.7 loaded successfully
When it fails those lines aren't present. This makes me think it's somehow liked to the python interpreter? @GerhardAtSafe - any other ideas. 

 

I know in FME 2018.1 on desktop I see a warning about 2.7 python support being reduced. Any chance this is related?

Hi!

Any solution to this so far?

We're experience almost the same thing but with a slightly different message. This on says:

Only 1 session object may exist within a processPythonCaller_8(PythonFactory): PythonFactory failed to process feature

 

 

 

We merge from FME 2015.1 to FME 2018.1 and have moved the scripts with FME Workbench 2015.1 to the FME 2018 server. 

Our script is a startscript which call several subscripts with FMEServerJobSubmitter. Scripts number 2 & 3 are more or less identical where script #2 runs ok but #3 fails. If we change the order in the startscript so that script #3 are called before #2, then #2 fails. The last script fails! It seems like there are some open handles(?) from subscript #2 that  creates the error in the script that follows. 

We can also see that if the script execution fails, the log lacks info about what Python interpreter that is loaded. 

Badge +2

Hi!

Any solution to this so far?

We're experience almost the same thing but with a slightly different message. This on says:

Only 1 session object may exist within a processPythonCaller_8(PythonFactory): PythonFactory failed to process feature

 

 

 

We merge from FME 2015.1 to FME 2018.1 and have moved the scripts with FME Workbench 2015.1 to the FME 2018 server.

Our script is a startscript which call several subscripts with FMEServerJobSubmitter. Scripts number 2 & 3 are more or less identical where script #2 runs ok but #3 fails. If we change the order in the startscript so that script #3 are called before #2, then #2 fails. The last script fails! It seems like there are some open handles(?) from subscript #2 that creates the error in the script that follows.

We can also see that if the script execution fails, the log lacks info about what Python interpreter that is loaded.

Hi @anteboy65,

Please could you report this as a problem here and include the following information.

  • In the FMEServerJobSubmitter what are the parameter submission settings - if you change these does the error still occur?
  • Can you confirm that each workspace being run has both a Python Startup Script as well as uses a PythonCaller/Creator within the actual workspace? (I think I've understood this correctly?)
  • Please include the fmeprocessmonitorengine.log and fmeserver.log as well as the job logs for both the successful and failed child job as well as the parent log.
Badge

Hi @anteboy65,

Please could you report this as a problem here and include the following information.

  • In the FMEServerJobSubmitter what are the parameter submission settings - if you change these does the error still occur?
  • Can you confirm that each workspace being run has both a Python Startup Script as well as uses a PythonCaller/Creator within the actual workspace? (I think I've understood this correctly?)
  • Please include the fmeprocessmonitorengine.log and fmeserver.log as well as the job logs for both the successful and failed child job as well as the parent log.

Hi @hollyatsafe,

I can confirm that each one of the subscripts contains both a python startup script as well as a PythonCaller. Is that a problem do you think?

We will report this as a problem.

 

/Anders

 

 

Badge +2

Hi @alex_chris, @tmackay97, @virtualcitymatt, @anteboy65

I am pleased to say the issue associated with this error has now been resolved and the fix is available in our latest release 2018.1.1.1 b18586 which is available from safe.com/downloads.

Please reach out to Safe Support if you have any issues with this.

Reply