WeasyPrint 0.42 gets stuck
See original GitHub issueWe are calling WeasyPrint via pandoc. With 0.42 and a certain input, the command never completes, but does not throw an error, causing builds to timeout.
Downgrading from weasyprint 0.42 to 0.41 solves the issue: https://github.com/greenelab/scihub-manuscript/commit/5cb1245ca3e68c425b1364317e2496c17e20353c produced a passing build.
The issue doesn’t happen for all inputs (pandoc manuscripts). See for example, this passing build with WeasyPrint 0.42.
The command that fails is:
pandoc \
--from=markdown \
--to=html5 \
--pdf-engine=weasyprint \
--pdf-engine-opt=--presentational-hints \
--filter=pandoc-fignos \
--filter=pandoc-eqnos \
--filter=pandoc-tablenos \
--bibliography=$BIBLIOGRAPHY_PATH \
--csl=$CSL_PATH \
--metadata link-citations=true \
--webtex=https://latex.codecogs.com/svg.latex? \
--css=webpage/github-pandoc.css \
--output=output/manuscript.pdf \
$INPUT_PATH
Any ideas on what the problem could be or how to better diagnose the issue?
Issue Analytics
- State:
- Created 6 years ago
- Comments:21 (17 by maintainers)
Top Results From Across the Web
Developers - WeasyPrint 0.42 gets stuck - - Bountysource
We are calling WeasyPrint via pandoc. With 0.42 and a certain input, the command never completes, but does not throw an error, causing...
Read more >WeasyPrint 43 documentation - GitHub Pages
WeasyPrint is a visual rendering engine for HTML and CSS that can export to PDF. It aims to support web standards for printing....
Read more >Changelog — WeasyPrint 57.1 documentation - CourtBouillon
#555: Fix margins, borders and padding in column layouts. Version 0.42 . Released on 2017-12-26. WeasyPrint is not tested with (end-of-life) ...
Read more >weasyprint 43 - PyPI
WeasyPrint is a visual rendering engine for HTML and CSS that can export ... Version 0.42.3 ... Fix root when frozen with Pyinstaller....
Read more >WeasyPrint Documentation - manpages.ubuntu!
From a technical point of view, WeasyPrint is a visual rendering engine for HTML and CSS that can export to PDF. It aims...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve checked the tricky part of the new breaking line algorithm that causes these bugs (see #301 and #528). I’ve added some comments to help us in the future and corrected a couple of problems. I’ve also added a test to make sure this case won’t happen again.
I really appreciate the time you take to report the issues and provide examples. If you find other crashes, please report them as well, I’ll do my best to fix them as soon as possible!
Hi,
I am running into some issues with WeasyPrint getting stuck when creating PDFs from certain HTML files. I have now managed to (kind of) narrow down when this error occurs. My coding skills are insufficient to go into the WeasyPrint code to find out why this is happening; I hope this is helpful anyway. The files are attached.
wp-table-demonstration.zip
Basically, it’s quite strange: On my system, the file “triangulate-error.html” will cause WeasyPrint to go into a kind of infinite loop when printing a page that contains a table; while “triangulate-noerror.html” will create a PDF within a matter of seconds. The only difference between them is in one additional “strong” tag in one of the cells. No error is logged by WeasyPrint. Interestingly, one other way to make the issue disappear is to change the font in the CSS to “Times New Roman”. (I have also tried Georgia, Palatino, and my preferred font Iowan Old Style.)
My system is macOS Sierra 10.12.6 (16G1212), Python 3.6.4, WeasyPrint version 0.42.1. I hope someone is able to reproduce this problem. If there is any way I can help, let me know.
EDIT: I have looked in-depth at another article that was causing the problem. I now have the suspicion that it is probably something to do with using tags that affect formatting such as “strong” and “em” within brackets, both round and square.