Merge pull request #14582 from ankush/weasyprint_import_error

fix(dx): error message for missing system deps
This commit is contained in:
mergify[bot] 2021-10-27 06:00:34 +00:00 committed by GitHub
commit 704d5e2fc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,8 +1,20 @@
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See LICENSE
import click
import frappe
from weasyprint import HTML, CSS
try:
from weasyprint import HTML, CSS
except OSError:
click.secho(
"\n".join(["WeasyPrint depdends on additional system dependencies.",
"Follow instructions specific to your operating system:",
"https://doc.courtbouillon.org/weasyprint/stable/first_steps.html"]),
fg="yellow"
)
raise
@frappe.whitelist()