Hello,
I tried to ugrade to indico 3.3.1 from 3.2.8 and after running indico db upgrade I get
WeasyPrint could not import some external libraries. Please carefully follow the installation steps before reporting an issue:
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#installation
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#troubleshooting
Traceback (most recent call last):
File "/opt/indico/.venv/bin/indico", line 8, in <module>
sys.exit(cli())
^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/indico/cli/util.py", line 108, in invoke
return self._impl.invoke(ctx)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/click/core.py", line 1685, in invoke
super().invoke(ctx)
File "/opt/indico/.venv/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/flask/cli.py", line 385, in decorator
app = ctx.ensure_object(ScriptInfo).load_app()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/flask/cli.py", line 330, in load_app
app: Flask | None = self.create_app()
^^^^^^^^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/indico/cli/util.py", line 26, in _create_app
return make_app()
^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/indico/web/flask/app.py", line 424, in make_app
configure_db(app)
File "/opt/indico/.venv/lib/python3.12/site-packages/indico/web/flask/app.py", line 300, in configure_db
import_all_models()
File "/opt/indico/.venv/lib/python3.12/site-packages/indico/core/db/sqlalchemy/util/models.py", line 265, in import_all_models
import_module(module)
File "/opt/indico/.pyenv/versions/3.12.3/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/opt/indico/.venv/lib/python3.12/site-packages/indico/modules/receipts/__init__.py", line 12, in <module>
from indico.modules.receipts.util import can_user_manage_receipt_templates, has_any_receipts, has_any_templates
File "/opt/indico/.venv/lib/python3.12/site-packages/indico/modules/receipts/util.py", line 28, in <module>
from weasyprint import CSS, HTML, default_url_fetcher
File "/opt/indico/.venv/lib/python3.12/site-packages/weasyprint/__init__.py", line 419, in <module>
from .css import preprocess_stylesheet # noqa isort:skip
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/weasyprint/css/__init__.py", line 27, in <module>
from .computed_values import COMPUTER_FUNCTIONS
File "/opt/indico/.venv/lib/python3.12/site-packages/weasyprint/css/computed_values.py", line 9, in <module>
from ..text.ffi import ffi, pango, units_to_double
File "/opt/indico/.venv/lib/python3.12/site-packages/weasyprint/text/ffi.py", line 431, in <module>
pango = _dlopen(
^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/weasyprint/text/ffi.py", line 417, in _dlopen
return ffi.dlopen(names[0]) # pragma: no cover
^^^^^^^^^^^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/cffi/api.py", line 150, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/cffi/api.py", line 832, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/indico/.venv/lib/python3.12/site-packages/cffi/api.py", line 827, in _load_backend_lib
raise OSError(msg)
OSError: cannot load library 'pango-1.0-0': pango-1.0-0: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'pango-1.0-0'
Please advise.
Thank you!
Best regards