You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "wsgiDev.py", line 2, in <module>
from api.main import app
File "/Users/davidthompson/Code/hsauditService/api/main.py", line 9, in <module>
from api.resources.letter.letter import (
File "/Users/davidthompson/Code/hsauditService/api/resources/letter/letter.py", line 14, in <module>
from api.celeryTasks.app_tasks import massGenerateLetters
File "/Users/davidthompson/Code/hsauditService/api/celeryTasks/app_tasks.py", line 16, in <module>
from api.resources.letter.letterHelpers import createPDFFileFromHTML, renderWrapper
File "/Users/davidthompson/Code/hsauditService/api/resources/letter/letterHelpers.py", line 9, in <module>
from weasyprint import HTML
File "/Users/davidthompson/.virtualenvs/hsauditservice/lib/python3.7/site-packages/weasyprint/__init__.py", line 440, in <module>
from .css import preprocess_stylesheet # noqa isort:skip
File "/Users/davidthompson/.virtualenvs/hsauditservice/lib/python3.7/site-packages/weasyprint/css/__init__.py", line 30, in <module>
from . import computed_values, media_queries
File "/Users/davidthompson/.virtualenvs/hsauditservice/lib/python3.7/site-packages/weasyprint/css/computed_values.py", line 18, in <module>
from .. import text
File "/Users/davidthompson/.virtualenvs/hsauditservice/lib/python3.7/site-packages/weasyprint/text.py", line 14, in <module>
import cairocffi as cairo
File "/Users/davidthompson/.virtualenvs/hsauditservice/lib/python3.7/site-packages/cairocffi/__init__.py", line 49, in <module>
('libcairo.so.2', 'libcairo.2.dylib', 'libcairo-2.dll'))
File "/Users/davidthompson/.virtualenvs/hsauditservice/lib/python3.7/site-packages/cairocffi/__init__.py", line 44, in dlopen
raise OSError(error_message) # pragma: no cover
OSError: no library called "cairo-2" was found
no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so.2': dlopen(libcairo.so.2, 0x0002): tried: 'libcairo.so.2' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibcairo.so.2' (no such file), '/Users/davidthompson/.local/share/mise/installs/python/3.7.17/lib/libcairo.so.2' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/davidthompson/.local/share/mise/installs/python/3.7.17/lib/libcairo.so.2' (no such file), '/usr/lib/libcairo.so.2' (no such file, not in dyld cache), 'libcairo.so.2' (no such file), '/usr/local/lib/libcairo.so.2' (no such file), '/usr/lib/libcairo.so.2' (no such file, not in dyld cache). Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo.so.2'
cannot load library 'libcairo.2.dylib': dlopen(libcairo.2.dylib, 0x0002): tried: 'libcairo.2.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibcairo.2.dylib' (no such file), '/Users/davidthompson/.local/share/mise/installs/python/3.7.17/lib/libcairo.2.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/davidthompson/.local/share/mise/installs/python/3.7.17/lib/libcairo.2.dylib' (no such file), '/usr/lib/libcairo.2.dylib' (no such file, not in dyld cache), 'libcairo.2.dylib' (no such file), '/usr/local/lib/libcairo.2.dylib' (no such file), '/usr/lib/libcairo.2.dylib' (no such file, not in dyld cache). Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo.2.dylib'
cannot load library 'libcairo-2.dll': dlopen(libcairo-2.dll, 0x0002): tried: 'libcairo-2.dll' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibcairo-2.dll' (no such file), '/Users/davidthompson/.local/share/mise/installs/python/3.7.17/lib/libcairo-2.dll' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/davidthompson/.local/share/mise/installs/python/3.7.17/lib/libcairo-2.dll' (no such file), '/usr/lib/libcairo-2.dll' (no such file, not in dyld cache), 'libcairo-2.dll' (no such file), '/usr/local/lib/libcairo-2.dll' (no such file), '/usr/lib/libcairo-2.dll' (no such file, not in dyld cache). Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo-2.dll'
The text was updated successfully, but these errors were encountered:
To be honest, Python 3.7 is deprecated by since June 2023, Cairo use is dropped in WeasyPrint since April 2021, version 51 has been released in 2019, I’ve never heard of Mise, and Macport has never been the official way to install dependencies for macOS in our documentation. I’m not sure we’ll be able to help you.
/opt/local/lib has never been tried to find libcairo.2.dylib according to your error messages, so I suppose that you didn’t set the environment variable in the same shell as the one used to launch your application. We currently use DYLD_FALLBACK_LIBRARY_PATH for the CI.
I've seen a number of other posts related to weezyprint or other libraries and problems with
cairo
, but none of them solved our issue. Some info:.mise
file pathcairo
withport install cairo
(macports)/opt/local/lib
, we tried the following (and various combos of it):Here's what we see:
The text was updated successfully, but these errors were encountered: