btreport
btreport copied to clipboard
OSError: dlopen() failed to load a library: cairo / cairo-2 / cairo-gobject-2
Love the idea of this, and really wish I could figure out how to integrate it! Thanks for building it.
Receiving this error when I try to run the "demo"
$ python example.py /
Traceback (most recent call last):
File "example.py", line 6, in <module>
from report import Cerebro
File "/Users/tw/Github/btreport/report.py", line 7, in <module>
from weasyprint import HTML
File "/anaconda3/lib/python3.6/site-packages/weasyprint/__init__.py", line 375, in <module>
from .css import preprocess_stylesheet # noqa
File "/anaconda3/lib/python3.6/site-packages/weasyprint/css/__init__.py", line 29, in <module>
from . import computed_values
File "/anaconda3/lib/python3.6/site-packages/weasyprint/css/computed_values.py", line 16, in <module>
from .. import text
File "/anaconda3/lib/python3.6/site-packages/weasyprint/text.py", line 18, in <module>
import cairocffi as cairo
File "/anaconda3/lib/python3.6/site-packages/cairocffi/__init__.py", line 41, in <module>
cairo = dlopen(ffi, 'cairo', 'cairo-2', 'cairo-gobject-2')
File "/anaconda3/lib/python3.6/site-packages/cairocffi/__init__.py", line 38, in dlopen
raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names))
OSError: dlopen() failed to load a library: cairo / cairo-2 / cairo-gobject-2
same here
try this
$ brew install cairo
$ brew install pango
Missing graphs are no doubt due to Weasyprint not being installed fully. Having just installed it one two machines, I know it can be difficult to install. The link below is very good and should be followed carefully. The graphs are working fine for me so I don't think it is a problem with the code.
https://weasyprint.readthedocs.io/en/latest/install.html