Question
· Apr 5, 2017

[Python-Cache Binding] DLL load failed when trying to import intersys.pythonbind3 using $zf(-1)

I have done Python - Cache binding setup following the guide from http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=.... I have also run test.py from sample3 folder and it able to run and complete successfully.

However, when I try to run the same test.py code via $zf, it gives error with exit code 1.

I've tried running help("intersys.pythonbind3") via $zf and also running from Cache terminal as follows:

  1. $zf(-1,"C:\Python36\python <path>/script.py")
  2. ! C:\Python36\python <path>/script.py

which gives me the following output:

problem in intersys.pythonbind3 - ImportError: DLL load failed: The specified module could not be found.

But running the above directly from command prompt is fine.

Any ideas on this ImportError?

Regards,

Ivan

Discussion (6)0
Log in or sign up to continue

Thank you for your comment. I have no issue with reading the output. The problem I have is regarding the DLL error. From what I understand, $zf invokes OS shell which should be equivalent to CMD. So why is running same script via these 2 approaches give 1 success 1 error. Am I missing some configurations/parameters for $zf?

In case anyone else facing the same issue and for future reference, I include here with my workaround for the error here.

I managed to solve it by referring to this forum (Link: http://www.progtown.com/post37004192.html#p37004192)

I have simply done the following:

Copy all DLL from folder <cachesys>\dev\cpp\lib to <python installation path>\Lib\site-packages\intersys

Although I not sure whether how legit is this solution, but this is currently a logical and plausible workaround for the problem I faced here.

Regards,

Ivan