I’m trying to discover why my stand-alone python script cannot now ‘import fmeobjects’ after an upgrade of FME Desktop 2022.2 to FME Forms 2023.2.2.
The sys.append path that worked previously had a python version subfolder inside the installation’s fmeobjects folder, like this:
if os.path.isdir(rf"{FME_HOME}\fmeobjects\{python_subfolder}"):
os.add_dll_directory(FME_HOME)
sys.path.append(rf'{FME_HOME}\fmeobjects\{python_subfolder}")
sys.path.append(FME_HOME)
os.chdir(FME_HOME)
import fmeobjects
but those python subfolders are no longer there inside the fmeobjects folder in the Form current installation, but rather are outside in their own ‘python’ folder now. Is this correct? It seems that most of the searching I’ve done has the path to the python version as a subfolder of fmeobjects folder.
No amount of appending sys.path versions of the python_subfolder will allow python to correctly ‘import fmeobjects’ and not stop producing:
ImportError: DLL load failed while importing fmeobjects: The specified module could not be found.
What gives? TIA
Brian