question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing packages required for WeasyPrint in frappe-worker

See original GitHub issue

Description of the issue

Image for frappe-worker doesn’t have some packages required by weasyprint package. Due to that when trying to start ERP-next site-creator fails.

Context information

While using develop branch site-creator failed on importing weasyprint with message of missing libcairo-2 package

Steps to reproduce the issue

  1. Checkout develop branch
  2. Copy env-local to .env
  3. Start project with docker-compose
  4. Logs of site-creator shows critical error on importing weasyprint
  5. Project isn’t configured and doesn’t work.

Solution

Add more packages in frappe-worker Dockerfile. I had to add libcairo2 python3-cffi python3-brotli libpango-1.0-0 libpangoft2-1.0-0 libpangocairo-1.0-0 but I’m not really familiar with weasyptint so that might be excessive. Weasyprint documentation state https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#debian-11 that for debian only python3-cffi python3-brotli libpango-1.0-0 libpangoft2-1.0-0 are needed but I was not able to run without explicit installation of libpangocairo.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dtwmcommented, Oct 28, 2021

@vrslev true that. something like this:

    # Install additional requirements for develop branch
    && if [ ${GIT_BRANCH} == 'develop' ]; then apt install \
        libcairo2 \
        python3-cffi \
        python3-brotli \
        libpango-1.0-0 \
        libpangoft2-1.0-0 \
        libpangocairo-1.0-0; \
    fi \

inside of apt install should be better. It takes forever to check so might take a while.

0reactions
revantcommented, Nov 1, 2021

merged #537

Read more comments on GitHub >

github_iconTop Results From Across the Web

v53.0b2 Global Installation · Issue #1384 · Kozea/WeasyPrint
My CI script is on a php:8 image as the package is for PHP an. ... could show the steps required to get...
Read more >
First Steps — WeasyPrint 57.1 documentation - CourtBouillon
To install WeasyPrint inside a virtualenv using wheels (if possible), you need the following packages: apk add py3-pip gcc musl-dev python3-dev pango ...
Read more >
Problems with weasyprint installation on windows 10
Problems with weasyprint installation on windows 10 · Step 1: Install Python - check · Step 2: Update pip and setuptools packages -...
Read more >
weasyprint - PyPI
WeasyPrint is a smart solution helping web developers to create PDF documents. It turns simple HTML pages into gorgeous statistical reports, invoices, ...
Read more >
WeasyPrint 43 documentation - GitHub Pages
WeasyPrint ¶. WeasyPrint is a visual rendering engine for HTML and CSS that can export to PDF. It aims to support web standards...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found