Skip to main content

Hi list.

This is more an administrative question than a technical one, but I need some insight into what's best practice.

My installation has multiple FME versions (2016-2019, x32+x64), and most of these versions are still being used in regular tasks.

I have a "Shared FME Folders" site defined on a network drive, and this is shared by all FME versions via FME options.

I have created a substantial number of custom transformers in here, and they all run with the embedded Python interpreter.

So far I'm using Python 2.7 in all FME versions, which luckily is still an option in 2019 (although deprecated), but I would like to upgrade them to Python 3.x.

My problem is, that since all transformers are shared among all FME versions, it looks like it needs to be an "all-or-nothing" update. There's no provision for a separate transformer repository for each Python version, nor for each FME versions.

I.e. all transformers need to be updated to Python 3.x all at once, and all FME instances then need to be switched to using Python 3.x all at once.

Alternatively I need to copy all transformers to each FME instances, and disable my "Shared FME Folders", and then update one at a time. But this seems like not sensible and counter-productive.

Or is there an easier or better way I haven't thought of ? Any insights are most welcome.

Cheers.

I had to do a similar task. I followed this tutorial:

Look at Custom transformer X with python 2.7 - try to replace the PythonCaller with real transformers and save as new Custom transformer in folder FME2019\\Custom transformers\\

If you cant replace the PythonCaller then you need to upgrade to 3.0 and find which workspaces are using that Custom transformer (you can do that by using a Reader on format FME Workspace (FMW) on all your workspaces). and then save these updated workspaces also in FME2019\\FME Workspaces or similar.

Also remember to delete and replace the GeographicalBufferer (which is behind the scenes depending on Python 2.7) - and there might be some more transformers.

I always prefer to do this as then I can remove old parts of a workspace and try to get them to run a bit faster. Also do some more comments, replace readers/writers with featurereader/featurewriters etc. There is always some good maintenance to do.


I had to do a similar task. I followed this tutorial:

Look at Custom transformer X with python 2.7 - try to replace the PythonCaller with real transformers and save as new Custom transformer in folder FME2019\\Custom transformers\\

If you cant replace the PythonCaller then you need to upgrade to 3.0 and find which workspaces are using that Custom transformer (you can do that by using a Reader on format FME Workspace (FMW) on all your workspaces). and then save these updated workspaces also in FME2019\\FME Workspaces or similar.

Also remember to delete and replace the GeographicalBufferer (which is behind the scenes depending on Python 2.7) - and there might be some more transformers.

I always prefer to do this as then I can remove old parts of a workspace and try to get them to run a bit faster. Also do some more comments, replace readers/writers with featurereader/featurewriters etc. There is always some good maintenance to do.

To clarify: I'm not using PythonCaller, my transformers are built with stand-alone Python code and FMX files.

And I would very much like to not save the transformers locally with each version of FME, but maintain a shared location, at least as the final result.


What we've done ourselves to handle supporting multiple versions of Python is to update the Python code to make it compatible with both Python 2 and 3.

Here's a useful reference for that: https://python-future.org/compatible_idioms.html

Doing this would let you maintain just a single version of each transformer that can run with both newer FME (and python versions) and also have them continue working with the older versions.


What we've done ourselves to handle supporting multiple versions of Python is to update the Python code to make it compatible with both Python 2 and 3.

Here's a useful reference for that: https://python-future.org/compatible_idioms.html

Doing this would let you maintain just a single version of each transformer that can run with both newer FME (and python versions) and also have them continue working with the older versions.

Thanks for sharing this, Laura.

I was thinking along the same ideas, and have updated my transformers so they compile with both 2.7 and 3.7. I'm switching the preferred Python interpreter now, crossing all my fingers 🙂


Reply