Hi all,
so today I get this error on my pc (until today all was ok)
File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\lib\wxcairo.py", line 251, in _findCairoLib
raise RuntimeError, "Unable to find the Cairo shared library"
RuntimeError: Unable to find the Cairo shared library
The ctypes.util cannot find cairo anymore, I've tried manually from the python command line to call ctypes.util.find_library("cairo/etc.etc.") and it doesn't find the cairo lib. I also tried to add the cairo dlls location to the system path, reinstall wxpython/pycario, repair python installation, nothing worked.
The only thing that could affect python today was installing cherrypy.
Note that if I disable the _findCairoLib call in wxcairo.py I can use cairo from my program and also the wxpython demo "Cairo_snippets" works well, "Cairo" demo page has this error appearing on the demo log messages:
Debug: ..\..\src\msw\dc.cpp(2338): 'BitBlt' failed with error 0x00000057 (parametro non corretto.)
switching back to "code" notebook tab and then to "demo" draws cairo correctly after this error, then python crashes at exit of the wxpython demo while my program works perfectly well with the subset of cairo that I use.
How can I narrow the problem? Should I just give up and reinstall everything?
Thanks
If I execute the ctypes.util.py module, I get this error:
<CDLL 'msvcrt', handle 76c10000 at 22ad630>
Traceback (most recent call last):
File "C:\Python25\Lib\ctypes\util.py", line 166, in <module>
test()
File "C:\Python25\Lib\ctypes\util.py", line 141, in test
print cdll.load("msvcrt")
File "C:\Python25\lib\ctypes\__init__.py", line 423, in __getattr__
dll = self._dlltype(name)
File "C:\Python25\lib\ctypes\__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] Impossibile trovare il modulo specificato
my settings:
windows vista home premium 32 bit
python 2.5.4
wxpython 2.8.10.1
pycairo 1.8.4
cairo 1.8.6-.1
To use cairo, the following files have been copied in c:\python25\lib\site-packages\cairo (as suggested somwhere in wxpython-users):
libcairo-2.dll
libpng12-0.dll
zlib1.dll