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
This exception crept in after upgrading from version 0.19.2 to 0.20.0 (and is still present in 0.21.2)
The line in question (preferred.py:170): return width.value / 100. * table.width
In my case, table.width is 'auto'.
Adding an additional check table.width != 'auto' on line 169 and on line 156 fixes the problem.
File "/home/nat/.venv/engcalc/local/lib/python2.7/site-packages/weasyprint/layout/blocks.py", line 82, in block_box_layout
context, box, (containing_block.width, containing_block.height))
File "/home/nat/.venv/engcalc/local/lib/python2.7/site-packages/weasyprint/layout/tables.py", line 552, in table_wrapper_width
auto_table_layout(context, wrapper, containing_block)
File "/home/nat/.venv/engcalc/local/lib/python2.7/site-packages/weasyprint/layout/tables.py", line 492, in auto_table_layout
context, box, resolved_table_width=True)
File "/home/nat/.venv/engcalc/local/lib/python2.7/site-packages/weasyprint/layout/preferred.py", line 328, in table_and_columns_preferred_widths
context, cell, table, resolved_table_width)
File "/home/nat/.venv/engcalc/local/lib/python2.7/site-packages/weasyprint/layout/preferred.py", line 170, in table_cell_preferred_width
return width.value / 100. * table.width
TypeError: can't multiply sequence by non-int of type 'float'
The text was updated successfully, but these errors were encountered:
This exception crept in after upgrading from version 0.19.2 to 0.20.0 (and is still present in 0.21.2)
The line in question (preferred.py:170):
return width.value / 100. * table.width
In my case, table.width is 'auto'.
Adding an additional check
table.width != 'auto'
on line 169 and on line 156 fixes the problem.The text was updated successfully, but these errors were encountered: