Skip to main content
Question

Python Libraries not available?


cbrien
Contributor
Forum|alt.badge.img+1

Hi all,
I’m attempting to create a python script to encrypt a file for transfer to a bank.
We need to be using PGP encryption, and as I understand the only way to encrypt using FME is by way of python.

Having only recently joined the organisation, I was not here when the installation of the latest Form and Flow was undertaken, (otherwise I would have advised that the Flow installation 2022.1.1, should at least match the Form version 2023.2). But that’s only part of the problem I believe.
First, I would like to attempt to figure out if the libraries are available from a Form workspace running on my desktop.

When I check the INTERPRETER settings in the Options menu, it appears I cannot change or make reference to any alternative path.

So far I have had very little luck, and would like to know if anyone has

  1. a simple python script that can run in a workspace PythonCaller/PythonCreator that will provide a test (so far the script produces an error any way I attempt to write to the log). I must admit, I am at best a beginner with Python but use all manner of online resources to find solutions.
  1. a method of trolling through the installation of FME to find the answer

Any help would be very much appreciated.

Cam

3 replies

david_r
Evangelist
  • March 28, 2025

You’re right about having to use Python for this, FME cannot do PGP encryption natively, as far as I now. Your first issue is indeed that your Form is much more recent than your Flow, which isn’t supported: https://support.safe.com/hc/en-us/articles/25407441075469-FME-Versions-and-Workspace-Compatibility

Having taken care of that, you will have to install the required Python modules on both Form and Flow, as its somewhat different:

https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Form/Workbench/Installing-Python-Packages.htm

https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Form/Workbench/Importing_Custom_Python_Modules_FMEServer.htm


david_r
Evangelist
  • March 28, 2025

An alternative to Python might be to use a PGP command line utility using the SystemCaller transformer. That way you probably won’t have to write any Python at all, if that’s not your thing...


cbrien
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • March 31, 2025

Thanks David,
We’re going to try an install of gpg with the command to invoke that instead of the Python method. Unfortunately, I will not get around to an upgrade until a few months’ time. (still planning it).

If we, however, take to a Python solution, those articles and advice are well received.

Many thanks,

Cam Brien


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings