-
-
Notifications
You must be signed in to change notification settings - Fork 710
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
UnboundLocalError: local variable 'lower_guess' referenced before assignment #409
Comments
I also got this error. import weasyprint
test = """
<!DOCTYPE html>
<html>
<head>
<style>
td {{
width: 5mm;
padding: 0mm;
}}
</style>
</head>
<body>
<table>
<tr>
{}
</tr>
</table>
</body>
</html>
""".format("<td>x</td>"*50)
weasyprint.HTML(string=test).write_pdf("test.pdf") I get the following error:
But if I turn 50 into 49 or if i change padding to 1mm, or remove the width, then it works again. I use Python 3.5.2 and WeasyPrint 0.34 |
Currently hitting this issue on Python 3.6.3 and WeasyPrint 0.41, with this file: https://pastebin.com/raw/QAuuneeF
It's defined as
so somehow max_content_guesses ( Explicitly calling The trouble seems to stem from preferred.py:43 and 67; min_content_width and max_content_width. |
Weasyprint 44 fails as follows with the files
|
What's triggering this is |
I have tried to convert some generated HTML file (the stripped version is
test.zip) and WeasyPrint 0.34 under Python 3.6.0 on Windows 7 throws the following exception:
The text was updated successfully, but these errors were encountered: