Skip to main content
Question

Pythoncaller error in FME2013 using external lib that include dll


Hi,

 

 

I'm using pythoncaller in FME2013 to manipulate an xml (it's a legacy workbench I have to maintain). I use the python interpreter that is installed outside of FME. Since we upgrade to FME2013, I get an error when importing external python libs that depends on .dll or .pyd files.

 

 

I get this error: Python Exception <ImportError>: DLL load failed

 

 

Is there a specific limitation of FME2013 with libs that contains .dll and .pyd?

 

 

Thanks

 

 

Jean-Sebastien

 

 

5 replies

david_r
Evangelist
  • June 6, 2013
Bonjour Jean-Sebastien,

 

 

The error message could indicate a problem with a different version of Python (hint: python26.dll comes in different versions).

 

 

Which version of Python/FME did you use before, and which version of Python do you use now? Please be as detailed as possible when asking complicated questions :-)

 

 

Also, do you have the "source code" for the .pyd file? If you have changed the version of Python when upgrading to FME2013, you will probably also have to recompile the .pyd for that specific version, or use the exact same Python interpreter as before the upgrade.

 

 

David

  • Author
  • June 7, 2013
Hi David,

 

 

We use a custom Python 2.7.2 installation. The python has not changed since the FME2013 upgrade. We were using FME2012 prior to FME2013.

 

 

The python code is quite simple. I only try to use the python lib lxml that is install on our system.

 

 

The following instruction:

 

from lxml import etree

 

 

return the error message mention above.

 

 

Any explanation on that problem would be appreciate.

 

 

Thanks

david_r
Evangelist
  • June 7, 2013
Hi,

 

 

seeing as FME2013 already ships with Python 2.7, why do you need a custom installation?

 

 

Also, unless your .pyd does something very particular, I would recommend replacing it with regular Python code. It is a whole lot easier to maintain. If you need to access an external dll, take a look at the ctypes module.

 

 

If everything else fails and you cannot find the resources to upgrade / rewrite your legacy code, your best bet might be to downgrade to FME2012 again. You will find the necessary installation files on ftp.safe.com.

 

 

David

 

 


  • Author
  • June 10, 2013
David,

 

 

We use a specific python installation that include many third-party libs that are not include in the python shiped with FME.

 

 

But that is not the issue. The real problem is that a workbench that was fully operational in FME2012 does not work anymore in FME2013. I would like to know why so that I can inform other workbench developers what they need to be aware of.

 

 

What has changed between these versions so that imports of external python libs that include .dll don't work anymore?

 

 

Downgrading to FME2012 is not an option for us.

 

 

Thanks again for your help.

 


david_r
Evangelist
  • June 10, 2013
Hi,

 

 

I think you will have to contact Safe support for that one, I suspect.

 

 

David

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings