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
ERROR: Failed to load inline SVG: unbound prefix: line 1, column 0
ERROR: Failed to load inline SVG: unbound prefix: line 1, column 0
Traceback (most recent call last):
File "/usr/local/bin/weasyprint", line 8, in<module>sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/weasyprint/__main__.py", line 214, in main
html.write_pdf(output, **kwargs)
File "/usr/local/lib/python3.9/site-packages/weasyprint/__init__.py", line 180, in write_pdf
self.render(
File "/usr/local/lib/python3.9/site-packages/weasyprint/__init__.py", line 134, in render
return Document._render(
File "/usr/local/lib/python3.9/site-packages/weasyprint/document.py", line 855, in _render
[Page(page_box) forpage_boxin page_boxes],
File "/usr/local/lib/python3.9/site-packages/weasyprint/document.py", line 855, in<listcomp>
[Page(page_box) forpage_boxin page_boxes],
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/__init__.py", line 124, in layout_document
pages = list(make_all_pages(context, root_box, html, pages))
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/pages.py", line 802, in make_all_pages
page, resume_at = remake_page(i, context, root_box, html)
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/pages.py", line 739, in remake_page
page, resume_at, next_page = make_page(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/pages.py", line 549, in make_page
root_box, resume_at, next_page, _, _ = block_level_layout(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 58, in block_level_layout
return block_level_layout_switch(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 72, in block_level_layout_switch
return block_box_layout(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 126, in block_box_layout
block_container_layout(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 517, in block_container_layout
collapsing_through) = block_level_layout(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 58, in block_level_layout
return block_level_layout_switch(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 72, in block_level_layout_switch
return block_box_layout(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 126, in block_box_layout
block_container_layout(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 517, in block_container_layout
collapsing_through) = block_level_layout(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 58, in block_level_layout
return block_level_layout_switch(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 72, in block_level_layout_switch
return block_box_layout(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 126, in block_box_layout
block_container_layout(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 517, in block_container_layout
collapsing_through) = block_level_layout(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 58, in block_level_layout
return block_level_layout_switch(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 72, in block_level_layout_switch
return block_box_layout(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 126, in block_box_layout
block_container_layout(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 517, in block_container_layout
collapsing_through) = block_level_layout(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 58, in block_level_layout
return block_level_layout_switch(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/blocks.py", line 88, in block_level_layout_switch
return flex_layout(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/flex.py", line 141, in flex_layout
content_size = min_content_width(context, new_child, outer=False)
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/preferred.py", line 48, in min_content_width
return block_min_content_width(context, box, outer)
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/preferred.py", line 168, in block_min_content_width
return _block_content_width(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/preferred.py", line 97, in _block_content_width
children_widths = [
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/preferred.py", line 98, in<listcomp>
function(context, child, outer=True) forchildin box.children
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/preferred.py", line 48, in min_content_width
return block_min_content_width(context, box, outer)
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/preferred.py", line 168, in block_min_content_width
return _block_content_width(
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/preferred.py", line 105, in _block_content_width
return adjust(box, outer, width)
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/preferred.py", line 161, in adjust
return margin_width(box, fixed, left, right)
File "/usr/local/lib/python3.9/site-packages/weasyprint/layout/preferred.py", line 140, in margin_width
width += box.style['border_left_width']
File "/usr/local/lib/python3.9/site-packages/weasyprint/css/__init__.py", line 718, in __missing__
value = function(self, key, value)
File "/usr/local/lib/python3.9/site-packages/weasyprint/css/computed_values.py", line 401, in border_width
return length(style, name, value, pixels_only=True)
File "/usr/local/lib/python3.9/site-packages/weasyprint/css/computed_values.py", line 325, in length
font_size = style['font_size']
TypeError: string indices must be integers
The text was updated successfully, but these errors were encountered:
Thanks a lot for the bug report! It’s now fixed. Until the next release, you can avoid the em unit in border widths, that’s why this crash was happening.
Sorry I'm struggling with installation ...
My HTML handles SVGs like so :
this is my HTML file
test.txt
and here is the error I get :
The text was updated successfully, but these errors were encountered: