【发布时间】:2021-11-03 03:06:51
【问题描述】:
我安装了几个基于 `https://pbpython.com/pdf-reports.htm 的文件来创建报告。但是以下错误消息
Traceback (most recent call last):
File "C:\histdata\test02.py", line 10, in <module>
from weasyprint import HTML
File "C:\Users\AquaTrader\AppData\Local\Programs\Python\Python38\lib\site-packages\weasyprint\__init__.py", line 322, in <module>
from .css import preprocess_stylesheet # noqa isort:skip
File "C:\Users\AquaTrader\AppData\Local\Programs\Python\Python38\lib\site-packages\weasyprint\css\__init__.py", line 27, in <module>
from . import computed_values, counters, media_queries
File "C:\Users\AquaTrader\AppData\Local\Programs\Python\Python38\lib\site-packages\weasyprint\css\computed_values.py", line 16, in <module>
from ..text.ffi import ffi, pango, units_to_double
File "C:\Users\AquaTrader\AppData\Local\Programs\Python\Python38\lib\site-packages\weasyprint\text\ffi.py", line 380, in <module>
gobject = _dlopen(
File "C:\Users\AquaTrader\AppData\Local\Programs\Python\Python38\lib\site-packages\weasyprint\text\ffi.py", line 377, in _dlopen
return ffi.dlopen(names[0]) # pragma: no cover
File "C:\Users\AquaTrader\AppData\Local\Programs\Python\Python38\lib\site-packages\cffi\api.py", line 150, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File "C:\Users\AquaTrader\AppData\Local\Programs\Python\Python38\lib\site-packages\cffi\api.py", line 832, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File "C:\Users\AquaTrader\AppData\Local\Programs\Python\Python38\lib\site-packages\cffi\api.py", line 827, in _load_backend_lib
raise OSError(msg)
OSError: cannot load library 'gobject-2.0-0': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'
有什么建议吗?提前致谢。 (请注意github上有一个类似的问题告诉个人安装GTK3。)这是正确的吗?
【问题讨论】:
标签: python weasyprint