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

The 54.1 cannot print the example of the ticket #1575

Closed
FrancoisCapon opened this issue Feb 23, 2022 · 1 comment
Closed

The 54.1 cannot print the example of the ticket #1575

FrancoisCapon opened this issue Feb 23, 2022 · 1 comment
Labels
crash Problems preventing documents from being rendered
Milestone

Comments

@FrancoisCapon
Copy link

Hi,

The 54.1 cannot print the example of the ticket unlike the 53.4 version:

root@4d1c5a356b98:/ticket# weasyprint ticket.html test.pdf :-(
Traceback (most recent call last):
  File "/usr/local/bin/weasyprint", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/weasyprint/__main__.py", line 188, in main
    html.write_pdf(output, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/weasyprint/__init__.py", line 183, in write_pdf
    self.render(
  File "/usr/local/lib/python3.9/dist-packages/weasyprint/__init__.py", line 134, in render
    return Document._render(
  File "/usr/local/lib/python3.9/dist-packages/weasyprint/document.py", line 930, in _render
    [Page(page_box) for page_box in page_boxes],
  File "/usr/local/lib/python3.9/dist-packages/weasyprint/document.py", line 930, in <listcomp>
    [Page(page_box) for page_box in page_boxes],
  File "/usr/local/lib/python3.9/dist-packages/weasyprint/layout/__init__.py", line 133, in layout_document
    pages = list(make_all_pages(context, root_box, html, pages))
  File "/usr/local/lib/python3.9/dist-packages/weasyprint/layout/page.py", line 855, in make_all_pages
    page, resume_at = remake_page(i, context, root_box, html)
  File "/usr/local/lib/python3.9/dist-packages/weasyprint/layout/page.py", line 792, in remake_page
    page, resume_at, next_page = make_page(
  File "/usr/local/lib/python3.9/dist-packages/weasyprint/layout/page.py", line 595, in make_page
    root_box.children = tuple(out_of_flow_boxes) + root_box.children
TypeError: can only concatenate tuple (not "list") to tuple
root@4d1c5a356b98:/ticket# pip uninstall weasyprint
Found existing installation: weasyprint 54.1
Uninstalling weasyprint-54.1:
  Would remove:
    /usr/local/bin/weasyprint
    /usr/local/lib/python3.9/dist-packages/weasyprint-54.1.dist-info/*
    /usr/local/lib/python3.9/dist-packages/weasyprint/*
Proceed (y/n)? y
  Successfully uninstalled weasyprint-54.1
root@4d1c5a356b98:/ticket# pip install weasyprint==53.4
Collecting weasyprint==53.4
  Downloading weasyprint-53.4-py3-none-any.whl (242 kB)
     |████████████████████████████████| 242 kB 2.0 MB/s 
Requirement already satisfied: Pillow>=4.0.0 in /usr/local/lib/python3.9/dist-packages (from weasyprint==53.4) (9.0.1)
...
Requirement already satisfied: six>=1.9 in /usr/local/lib/python3.9/dist-packages (from html5lib>=1.0.1->weasyprint==53.4) (1.16.0)
Installing collected packages: weasyprint
Successfully installed weasyprint-53.4
root@4d1c5a356b98:/ticket# weasyprint ticket.html test.pdf :-)
@grewn0uille grewn0uille added the crash Problems preventing documents from being rendered label Feb 23, 2022
@grewn0uille grewn0uille added this to the 54.2 milestone Feb 23, 2022
@liZe liZe closed this as completed in b1027ff Feb 23, 2022
@liZe
Copy link
Member

liZe commented Feb 23, 2022

Thanks for the report, and sorry for the shameful bug…

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

3 participants