You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works as intended if the border style is changed from dashed to dotted.
I can only get the crash to occur when the bordered element breaks across pages and contains a floated element, so possibly this is related to Issue #36.
Here's the stack trace:
Traceback (most recent call last):
File "/usr/local/bin/weasyprint", line 9, in <module>
load_entry_point('WeasyPrint==0.17', 'console_scripts', 'weasyprint')()
File "/usr/local/lib/python2.7/dist-packages/weasyprint/__main__.py", line 141, in main
getattr(html, 'write_' + format_)(output, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/weasyprint/__init__.py", line 159, in write_pdf
return self.render(stylesheets).write_pdf(target, zoom)
File "/usr/local/lib/python2.7/dist-packages/weasyprint/document.py", line 393, in write_pdf
page.paint(context, scale=scale)
File "/usr/local/lib/python2.7/dist-packages/weasyprint/document.py", line 226, in paint
draw_page(self._page_box, cairo_context, self._enable_hinting)
File "/usr/local/lib/python2.7/dist-packages/weasyprint/draw.py", line 61, in draw_page
draw_stacking_context(context, stacking_context, enable_hinting)
File "/usr/local/lib/python2.7/dist-packages/weasyprint/draw.py", line 167, in draw_stacking_context
draw_stacking_context(context, child_context, enable_hinting)
File "/usr/local/lib/python2.7/dist-packages/weasyprint/draw.py", line 137, in draw_stacking_context
context, stacking_context.page, block, enable_hinting)
File "/usr/local/lib/python2.7/dist-packages/weasyprint/draw.py", line 67, in draw_box_background_and_border
draw_border(context, box, enable_hinting)
File "/usr/local/lib/python2.7/dist-packages/weasyprint/draw.py", line 334, in draw_border
side, border_edge, padding_edge)
File "/usr/local/lib/python2.7/dist-packages/weasyprint/draw.py", line 477, in draw_border_segment
dash = length / (2 * round(length / (2 * dash)))
ZeroDivisionError: float division by zero
The text was updated successfully, but these errors were encountered:
This HTML file crashes WeasyPrint (0.17) with a division-by-zero error: http://www.stripey.com/demo/weasyprint/dash.html
It works as intended if the border style is changed from
dashed
todotted
.I can only get the crash to occur when the bordered element breaks across pages and contains a floated element, so possibly this is related to Issue #36.
Here's the stack trace:
The text was updated successfully, but these errors were encountered: