I thought I had a good idea to simplify our in-house processes by using FME Form startup python script to use subprocess.run to run external python files. That way we wouldn’t need to copy all the python code into the startup script and could easily make changes to it.
Unfortunately, it doesn’t seem to work.
subprocess.run FME Form runs the python script, but errors with “ModuleNotFoundError: No module named ‘boto3’. The python script itself works fine when run manually. It also works when copied into the FME startup section (in other words, boto3 runs successfully in both).
But for some reason, running subprocess.run within FME Form will not find boto3 in the external python file (even though it works if the python code in is the startup script section of FME Form).
I hope that description made sense. Is there a parameter for subprocess.run that I’m missing? Is there another way to run an external python file from FME startup?
Software and Settings:
FME Form version 2023.2.3.0 (20240313 - Build 23783 - WIN64)
Python Compatibility set to Esri ArcGIS Python 3.7+
ArcGIS Pro version 3.1.6
boto3 version 1.21.32 (installed through ArcGIS Pro Package Manager)