-
-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'PendingProperty' object is not subscriptable #2075
Comments
Full traceback (with the additional line!)
|
Hi! Could you please share the document (HTML+CSS) that caused this bug, so that we can more easily reproduce? |
Unfortunately I can't in an straightforward way. But I'll disable all CSS assets one by one until I find the exact point of failure. |
Good news, I've found an offending example that I can share. <!DOCTYPE html>
<html lang="en-GB">
<head>
{% block head %}
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
{% endblock %}
</head>
<style>
.bg-jsl {
background-color: #00857d !important;
}
.text-white {
color: white !important;
}
</style>
<body>
<table class="table border-secondary border-top">
<tr>
<td class="fw-bold text-white bg-jsl" colspan="2">
This works
</td>
<td class="fw-bold text-white bg-jsl">
This works
</td>
<td class="border border-top bg-white">
This fails
</td>
</tr>
</table>
</body>
</html> This worked just fine with 60.2 but fails with 61.0. I just noticed that if I add <td class="border border-top text-black bg-white">
This fails
</td> Also noticed that 61 does not need me to override |
It’s now fixed and tested. Bootstrap uses a lot of variables in quite complicated ways, and version 61.0 should change (improve?) many subtle things with it. If you have some real-life feedback about Bootstrap in WeasyPrint, don’t hesitate to send a mail! |
I realised that before 61 I needed to redefine things like
Will do many thanks. The reason why I'm using bootstrap is because I also use it to render a customer-facing form. Then I render the web form with weasyprint so that they get a PDF copy. They could use the print functionality from the browser, but it does nto allow me to number pages, and other killing features weeasyprint has. |
I also guess this alone does not qualify for a 61.1 :D ? |
We have at least one more annoying bug we have to fix before 61.1, but it will come soon! |
When using weasyprint 61.0 I'm getting the above error in line
WeasyPrint/weasyprint/draw.py
Line 1071 in a42c406
I've added a dumb print line
print(textbox.style["color"])
before that line, and this is what it shows:This did not happen with 60.2.
The text was updated successfully, but these errors were encountered: