paroj / libraw.py

Python Bindings for libraw
GNU Lesser General Public License v2.1
20 stars 4 forks source link

find_library() #2

Closed tanken closed 8 years ago

tanken commented 8 years ago

Hi,

The find_library() from ctypes seems to be throwing this error.

Traceback (most recent call last):
  File "<pyshell#21>", line 1, in <module>
    execfile('raw_test_2.py')
  File "raw_test_2.py", line 6, in <module>
    import libraw
  File "C:\tools\python2-x86_32\lib\site-packages\libraw.py", line 20, in <module>
    _hdl = cdll.LoadLibrary(ctypes.util.find_library("raw"))
  File "C:\tools\python2-x86_32\lib\ctypes\__init__.py", line 443, in LoadLibrary
    return self._dlltype(name)
  File "C:\tools\python2-x86_32\lib\ctypes\__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
TypeError: expected string or Unicode object, NoneType found

I don't understand the reason. Do I have a missing file?

Thanks

paroj commented 8 years ago

the call ctypes.util.find_library("raw") returned None. This means that the libraw.dllwas not found in your LD_LIBRARY_PATH (or the Windows equivalent). You may try putting the libraw.dll in the same folder as your application and try again.

tanken commented 8 years ago

Noted. Thank for the help!