-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
AssertionError on render_pdf() #29
Comments
Hello, |
Thanks for reply. But how then I can use the 54.x branch while using flask_weasyprint library? like flask_weasyprint recent version is 0.6 in which this bug exists. |
WeasyPrint is a dependency of Flask-WeasyPrint, which means that when you install Flask-WeasyPrint, the more recent version of WeasyPrint is installed. If you want to use the 54.x branch, you can use this command: |
Ok thanks for the answer it worked out! |
Hi, I got the assertion error when I called flask_weasyprint render_pdf method
My Code:
html = render_template('report.html', stress_data=#####, steps_data=#####, user_data=#####,
stress_img=#####, steps_img=#####)
pdf = render_pdf(HTML(string=html))
Error:
File "/usr/local/lib/python3.9/dist-packages/weasyprint/layout/block.py", line 299, in _linebox_layout
for i, (line, resume_at) in enumerate(lines_iterator):
File "/usr/local/lib/python3.9/dist-packages/weasyprint/layout/inline.py", line 43, in iter_line_boxes
line, resume_at = get_next_linebox(
File "/usr/local/lib/python3.9/dist-packages/weasyprint/layout/inline.py", line 114, in get_next_linebox
offset_x = text_align(
File "/usr/local/lib/python3.9/dist-packages/weasyprint/layout/inline.py", line 1134, in text_align
assert align == 'end'
Can you please fix that. Thanks
The text was updated successfully, but these errors were encountered: