How are you loading the fmeobjects module?
Are you e.g. sure that you've included all the necessary items in the PythonPath? I believe that you'll have to add all these to sys.path before importing fmeobjects (assuming Python 3.6):
<FME>\python
<FME>\python\python36
<FME>\fmeobjects\python36
<FME>\plugins
You may also want to make sure that your FME installation directory is in your PATH.
This worked for me with Python 3.6 64-bit (standalone interpreter) with FME 2019.1 64-bit:
>>> import sys
>>>Â sys.path.append(r'C:\apps\FME-2019-64\plugins')
>>>Â sys.path.append(r'C:\apps\FME-2019-64')
>>>Â sys.path.append(r'C:\apps\FME-2019-64\python')
>>>Â sys.path.append(r'C:\apps\FME-2019-64\python\python36')
>>>Â sys.path.append(r'C:\apps\FME-2019-64\fmeobjects\python36')
>>> import fmeobjects
>>>Â dir(fmeobjects)
Â'BY_FACE', 'FMEAggregate', 'FMEAlpha16Tile', 'FMEAlpha8Tile', ...]
How are you loading the fmeobjects module?
Are you e.g. sure that you've included all the necessary items in the PythonPath? I believe that you'll have to add all these to sys.path before importing fmeobjects (assuming Python 3.6):
<FME>\python
<FME>\python\python36
<FME>\fmeobjects\python36
<FME>\plugins
You may also want to make sure that your FME installation directory is in your PATH.
I have played around with the paths a bit, as at first I couldn't import at all. I find that the only way I can import fmeobjects in pythons stand alone interpreter for 3.6.8 is by having C:\Program Files\FME in the PYTHONPATH. If i use the 4 paths you suggested, i receive an error saying:
ImportError: DLL load failed: The specified procedure could not be found
Â
I have also included these paths in path
I have played around with the paths a bit, as at first I couldn't import at all. I find that the only way I can import fmeobjects in pythons stand alone interpreter for 3.6.8 is by having C:\\Program Files\\FME in the PYTHONPATH. If i use the 4 paths you suggested, i receive an error saying:
ImportError: DLL load failed: The specified procedure could not be found
Â
I have also included these paths in path
Have you verified that you have C:\\Program Files\\FME in your Windows PATH as well (not PYTHONHPATH)?
Have you verified that you have C:\\Program Files\\FME in your Windows PATH as well (not PYTHONHPATH)?
Yes, it is also in my PATH variable. I have a feeling it has an issue specifically with the 36 version of fmeobjects (hence why using the specific paths gives me a different error). I might retry this with a different python version to see if this makes a difference.
Yes, it is also in my PATH variable. I have a feeling it has an issue specifically with the 36 version of fmeobjects (hence why using the specific paths gives me a different error). I might retry this with a different python version to see if this makes a difference.
It worked for me using version 3.6, se my other post here...
It worked for me using version 3.6, se my other post here...
I was under the impression that that was using FME 2019 not 2018
Just an update in regards to this. It seems like FME Workbench 2018 must not have installed quite right (despite still being able to open the software, and run it normally). So reinstalling fixed the issue!