Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLL load error with ctypes if files are not in the same folder #18

Open
aashok3 opened this issue Mar 1, 2018 · 0 comments
Open

DLL load error with ctypes if files are not in the same folder #18

aashok3 opened this issue Mar 1, 2018 · 0 comments

Comments

@aashok3
Copy link

aashok3 commented Mar 1, 2018

I was getting this error message when I tried to run 'import fncs' even with the location of the libfncs and other DLLs added to the PYTHONPATH env variable.

Traceback (most recent call last):
File "<pyshell#0>", line 1, in
import fncs
File "c:\users\battelle (pnnl)\desktop\aditya\fncs\fncs\python\fncs.py", line 11, in
_lib = ctypes.CDLL(libname)
File "C:\Python27\lib\ctypes_init
.py", line 362, in init
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found

@jeffdaily mentioned that this was due to the assumption that the ctypes call made in fncs.py assumed files to be in the same folder. The libname passed does not involve the full path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant