Skip to main content
Question

Import module fme objects from FME 2017

  • March 6, 2017
  • 3 replies
  • 18 views

Forum|alt.badge.img

Hello everybody,

Last year i was programing some scripts in python that use the FME module call fmeobjects. Now, I am using FME 2017 (last version) and I want to use these scripts but they show me some errors.

Before I put the following lines in my code to import the libraries:

fmePydPath = "C:\\apps\\FME\\fmeobjects\\python27" #Python FME
fmePath = "C:\\apps\\FME\\" #FME
if fmePydPath not in sys.path: sys.path.append(fmePydPath)  #Try to add path
if fmePath not in sys.path: sys.path.append(fmePath) #Try to add path

Someone knows the directory for the new site? because I read that the directory is now in "C:\Program Files\FME" so i tried to put this code:

fmePydPath = "C:\\Program Files\\FME\\fmeobjects\\python27" #Python FME
fmePath = "C:\\Program Files\\FME\\" #FME
if fmePydPath not in sys.path: sys.path.append(fmePydPath)  #Try to add path
if fmePath not in sys.path: sys.path.append(fmePath) #Try to add path

but i get the next error:

"ImportError: DLL load failed: %1 is not a valid win32 application."

Thanks for your help,

David M.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

geosander
Forum|alt.badge.img+7
  • March 6, 2017

Your Python application (that calls FME objects) probably runs on a 32 bits Python installation, but your FME installation is a 64 bits version. Either install 32 bits FME or use a 64 bits Python installation.


Forum|alt.badge.img
  • Author
  • March 8, 2017

Your Python application (that calls FME objects) probably runs on a 32 bits Python installation, but your FME installation is a 64 bits version. Either install 32 bits FME or use a 64 bits Python installation.

Hi!

 

 

Man you are the best!! I didn't think in this way. Thanks a lot!

 

 

David M.

 

 


geosander
Forum|alt.badge.img+7
  • March 9, 2017
Hi!

 

 

Man you are the best!! I didn't think in this way. Thanks a lot!

 

 

David M.

 

 

No problem! Glad I could help :)