Question

Issue running workspaces from Python

  • 9 January 2022
  • 1 reply
  • 5 views

Badge

We are using FME Desktop 2022.0 Beta and have created many workbenches for nightly data processing. I want to run these in varying sequences using python but cannot get fmeobjects to load. We are running Python 3.7.11 64-bit (arcgispro-py3:conda) installed with ArcGIS Pro on a windows machine. The following code fails on import fmeobjects: ImportError: DLL load failed: The specified module could not be found.

import sys
sys.path.append(r"C:\Program Files\FME\fmeobjects\python37")
 
import fmeobjects

I see many posts pertaining to this issue but none of the recommend approaches work. I have also tried adding the path above to my PYTHONPATH with the same results.

 

Input?

 

 


1 reply

Badge

After chatting with FME support, they recommended changing the os.path to the FME install folder before importing the fmeobjects.  This appears to resolve the DLL Import Error. 

import sys, os
sys.path.append(r"C:\Program Files\FME\fmeobjects\python37")
os.chdir(r"C:\Program Files\FME")
 
import fmeobjects

 

 

Reply