Skip to content
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

Crash when drawing ridge/groove collapsed borders #1996

Closed
ryanwang520 opened this issue Nov 1, 2023 · 1 comment
Closed

Crash when drawing ridge/groove collapsed borders #1996

ryanwang520 opened this issue Nov 1, 2023 · 1 comment
Labels
crash Problems preventing documents from being rendered
Milestone

Comments

@ryanwang520
Copy link

from weasyprint import HTML
html_str = """<body>

<table style="border-collapse: collapse; width: 100%; height: 156px; border-color: #000000;" border="1">
<tbody>
<tr style="height: 26px;">
<td style="width: 7.043051359516616%; height: 26px;"><strong>QTY</strong></td>
</tr>
</tbody>
</table>

</body>
"""
html = HTML(string=html_str)
main_doc = html.render(presentational_hints=True)
main_doc.write_pdf()

The code above will cause a runtime TypeError Stream.set_color_rgb() missing 1 required positional argument: 'b' in Weasyprint 60.0.

I tested that the same code works in version 59.0 so I suspect it could be a regression.

@liZe liZe added the crash Problems preventing documents from being rendered label Nov 1, 2023
@liZe
Copy link
Member

liZe commented Nov 1, 2023

Thanks a lot for the detailed report 💜 .

I tested that the same code works in version 59.0 so I suspect it could be a regression.

You’re right, that’s a regression introduced by 8b2047c. Let’s fix this!

@liZe liZe closed this as completed in 3088ee9 Nov 1, 2023
@liZe liZe changed the title TypeError: Stream.set_color_rgb() missing 1 required positional argument: 'b' Crash when drawing ridge/groove collapsed borders Nov 1, 2023
@liZe liZe added this to the 61.0 milestone Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Problems preventing documents from being rendered
Projects
None yet
Development

No branches or pull requests

2 participants