pearu / pylibnidaqmx

a Python wrapper to libnidaqmx library
Other
10 stars 9 forks source link

ctypes LoadLibrary can't handle unicode strings #68

Closed pklapperich closed 6 years ago

pklapperich commented 6 years ago

This fixes an exception I was receiving while trying to import nidaqmx

>>> import nidaqmx Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\packet\Anaconda2\lib\site-packages\nidaqmx\__init__.py", line 83, in <module> from .libnidaqmx import AnalogInputTask, AnalogOutputTask,\ File "C:\Users\packet\Anaconda2\lib\site-packages\nidaqmx\libnidaqmx.py", line 128, in <module> _header_name, libnidaqmx = _find_library() File "C:\Users\packet\Anaconda2\lib\site-packages\nidaqmx\libnidaqmx.py", line 121, in _find_library lib = ctypes.windll.LoadLibrary(libfile) File "C:\Users\packet\Anaconda2\lib\ctypes\__init__.py", line 440, in LoadLibrary return self._dlltype(name) File "C:\Users\packet\Anaconda2\lib\ctypes\__init__.py", line 362, in __init__ self._handle = _dlopen(self._name, mode) TypeError: LoadLibrary() argument 1 must be string, not unicode