Any fmeobjects have to be imported in after the sys.append(<path to fmeobjects) FYI. I see in your python window from fmeobjects trying to import before the sys.append() command.
sys.path.append(r"C:\\Program Files\\FME\\fmeobjects\\python37") #any fmeobject imports must be below this
Can you elaborate on this ? "you will need to call the ArcGIS PRO python.exe directly and run the workbench through a command line f’string’ (my preferred method since it eliminates the python dependency between python and fmeobjects)." Thanks
I was referring to my 2nd example in the text file i attached above. So instead of trying to import fmeobjects and relying on correct installations of fme .dll and python objects, you can use the python module: subprocess to execute fme.exe through a command line call (just like you would in a cmd prompt). When you send the fme workbench commands with parameters they must be formatted as an f'string' when used inside python.
So a fme workbench is usually ran in a cmd line for example like this:
But to do this same execution in python - subprocess, it would look like this:
Notice how you don't need fmeobjects or other dependencies. It is a good workaround for those that may have multiple installations of python or fme etc. on their machine.
Example idle run:
