Question

FME Workbench Upgrade from 2020 to 2022 (Python Error)


Userlevel 2
Badge +10

Hi All,

 

Hope you are well,

 

I'm trying to upgrade an FME workbench made in FME 2020.2 to FME 2022.2 but keeps giving me a Python error while running,

 

I assume is something to do with Python 2 (FME 2020) and Python 3(2022) but can't figure out the workaround to update the workbench

 

Would you be able please provide me with the steps to upgrade the workbench without re-creating it in 2022?

 

Thanks in advance 🙂


14 replies

Userlevel 6
Badge +33

It depends... :)

Is the log pointing you in any direction?

Userlevel 1
Badge +11

Hi, I guess the community will be able to help if you can provide a little additional information about your workspace. So: what are you using Python for in your workspace, a startup Python script, a shutdown Python script, a PythonCaller...? And what is the exact error message you get?

Userlevel 2
Badge +10

Thanks both, here are some additional information. I have to say that the workbecnh has been created by someone else and passed onto me,

 

When I open the 2020 workbench in 2022 this is the first classic message I get:

 

imageThen I think Python is used in the Private Parameters for the following values:

imageI will attach the python codes for each of those to the original question.

 

And finally this is the error after running the workbench:

 

image 

 

 

 

Userlevel 1
Badge +11

OK, I would start with saving the workspace with the new Python Compatibility setting (just to avoid this error message pops up all the time when opening the workspace). Next, some modifications might be needed to your Python code snippets to accommodate for this upgrade from Python 2 to 3. From the screen dump of the log message you have added to your post it is not directly clear what exactly goes wrong. You may wish to run your workspace step by step, look at the messages and try to modify the Python code to overcome the errors... Recently, Don Murray (or was it Dale Lutz) confessed during a webinar that he is using ChatGPT to get his Python code right :-)

Userlevel 2
Badge +10

Thanks @egge​  very useful. Yes, I was thinking the same thing: 1) Save the workspace to new Python Compatibility 2)Use the ChatGPT to get the Python code right.

I will let you know the outcome!

Cheers

Userlevel 4
Badge +26

Looking at the screen shot I'm not 100% convinced that it's python related - Your workspace would fail with a python error before the workspace got started as there are private parameters and are pretty much the first things which will be resolved.

I can see from the screen shot your Installation path for FME includes "FME_2020.2.4", is it possible that your installation of FME 2022 was performed over the top of FME 2020 without first uninstalling? This will make FME become unstable for sure.

If so you will need to reinstall FME 2022.

Userlevel 2
Badge +10

Thanks @virtualcitymatt​ unfortunately I still need to keep FME 2020 installed on my machine fro other reasons. Would you recommend recommend to uninstall the current version of FME 2022 and re-install the latest version then (Build 22795 / April 4, 2023)?

Userlevel 1
Badge +11

Hi, it is perfectly possible to run two versions of FME Workbench on the same machine, as long as they are installed in different folders. So, if 2020 is installed in C:\\Program Files\\FME_2020.2.4, then 2022 should be in a folder like C:\\Program Files\\FME_2022.x.x

Can you confirm that both versions are installed separately? If not, you might have to reinstall both in a folder of their own. As soon as your workspace runs fine (again) under 2020, you can start the upgrade to 2022. As @virtualcitymatt​ indicates, the issue might not at all be Python related. Please keep us posted.

Userlevel 4
Badge +26

Thanks @virtualcitymatt​ unfortunately I still need to keep FME 2020 installed on my machine fro other reasons. Would you recommend recommend to uninstall the current version of FME 2022 and re-install the latest version then (Build 22795 / April 4, 2023)?

Yeah - you can have many FME's just make sure they are in different folders. You'll need to reinstall both if you've put FME 2022 over the top of FME 2020. I wold make sure to put each in an entirely new folder. I tend to use build numbers for my version (see screenshot) most of these folders are empty now after uninstalling old versions (I just don't have the space on my laptop to support more than 2 or 3 at the same time).

 

image

Userlevel 1
Badge +21

Thanks @egge​  very useful. Yes, I was thinking the same thing: 1) Save the workspace to new Python Compatibility 2)Use the ChatGPT to get the Python code right.

I will let you know the outcome!

Cheers

From the Scripted python parameter examples you posted, there is nothing within those that would cause a problem with a change to the python compatibility setting so it looks like that's a red herring and the problem lies elsewhere within the workspace.

Userlevel 2
Badge +10

Thanks guys, I have uninstalled and re-installed 2020 and 2022 using two different folders and you were right...the issue was nothing to do with Python (which is kind of relief 😀). I run the workbench in 2020 and works fine, then changed the Python compatibility to avoid the Python compatibility warning....and run it in 2022. No error about Python at all but I have got a different error now....Out of memory! screenshot below:

imageHow come the same FME workbench shows different behaviours using 2020 or 2022?

Any help to fix the out of memory is more than welcome!

Some specifications below that may help:

  • Space available in my C drive: 751 GB
  • FME version 2022.2.5.0 (build 22795)
  • Install RAM 32.0 GB (31.7 GB usable)

Thanks 🙂

 

 

 

Userlevel 6
Badge +33

Thanks guys, I have uninstalled and re-installed 2020 and 2022 using two different folders and you were right...the issue was nothing to do with Python (which is kind of relief 😀). I run the workbench in 2020 and works fine, then changed the Python compatibility to avoid the Python compatibility warning....and run it in 2022. No error about Python at all but I have got a different error now....Out of memory! screenshot below:

imageHow come the same FME workbench shows different behaviours using 2020 or 2022?

Any help to fix the out of memory is more than welcome!

Some specifications below that may help:

  • Space available in my C drive: 751 GB
  • FME version 2022.2.5.0 (build 22795)
  • Install RAM 32.0 GB (31.7 GB usable)

Thanks 🙂

 

 

 

Did you run it with or without feature caching on?

Userlevel 2
Badge +10

Hi @nielsgerrits​ I have run it with the 'Feature Caching ON' and 'Feature Caching OFF' with same result....Out of Memory. Also tried to run it with Quick Translator with same result.

Userlevel 4
Badge +26

Thanks guys, I have uninstalled and re-installed 2020 and 2022 using two different folders and you were right...the issue was nothing to do with Python (which is kind of relief 😀). I run the workbench in 2020 and works fine, then changed the Python compatibility to avoid the Python compatibility warning....and run it in 2022. No error about Python at all but I have got a different error now....Out of memory! screenshot below:

imageHow come the same FME workbench shows different behaviours using 2020 or 2022?

Any help to fix the out of memory is more than welcome!

Some specifications below that may help:

  • Space available in my C drive: 751 GB
  • FME version 2022.2.5.0 (build 22795)
  • Install RAM 32.0 GB (31.7 GB usable)

Thanks 🙂

 

 

 

Ha! What?! That's so much memory: 87163379736439 bytes is 87000 GB! This is definitely a strange bug. You can try and upgrade your transformers and readers in the workspace to see if that helps, but if it doesn't you might have to contact Safe Support.

If there is anyone else you can have to test your workspace on the same FME version that would at least rule out your machine as the problem.

 

Reply