Unable to import FabricEngine.Core in python

tfoxTDtfoxTD Posts: 4
edited June 2016 in Python Bindings

I'm trying to compile the HelloWorld EDK example for Fabric 2.2.0 on Windows 7. I'm following the instructions on this page:

And it works up until I try to run the test which fails with this:

Traceback (most recent call last):
  File "test.py", line 14, in <module>
    import FabricEngine.Core as fabric
  File "C:\Program Files\Fabric Engine\Python\2.7\FabricEngine\Core.py", line 11, in <module>
    import CAPI
  File "C:\Program Files\Fabric Engine\Python\2.7\FabricEngine\CAPI.py", line 28, in <module>
    _CAPI = swig_import_helper()
  File "C:\Program Files\Fabric Engine\Python\2.7\FabricEngine\CAPI.py", line 24, in swig_import_helper
    _mod = imp.load_module('_CAPI', fp, pathname, description)
ImportError: DLL load failed: The specified module could not be found.

I added some debug statements into CAPI.py, and these are the values being passed as fp, pathname, and description:

<open file 'C:\Program Files\Fabric Engine\Python\2.7\FabricEngine\_CAPI.pyd', mode 'rb' at 0x0000000001E70390> C:\Program Files\Fabric Engine\Python\2.7\FabricEngine\_CAPI.pyd ('.pyd', 'rb', 3)

I've confirmed that the .pyd file does exist, and I've triple checked that I'm running 64 bit python.
Any help getting this up and running would be appreciated.

Of course, mere minutes after I post a question, I find the answer.

So I looked up the windows program "Dependency Walker" which showed me that it wasn't finding the FabricCore-2.2.dll. As soon as I added the fabricEngine /bin folder to my PATH, ti worked like a charm.

Sign In or Register to comment.