-
-
Notifications
You must be signed in to change notification settings - Fork 684
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
Error: 'Node' object has no attribute 'text_bounding_box' (since version 61.0) #2070
Comments
Hi! Thanks for the report. The problem is in an SVG file (with text), do you have such an image in your document? |
Thanks for the fast response. And yes, I have a lot of SVG files with text.
Do you mean the SVG itself is the problem, so maybe not following the standard? |
I mean WeasyPrint has a problem 😄. Even if the SVG was not valid, it shouldn’t crash!
Thanks, I can reproduce with this page, I’ll find what’s wrong. |
It should be fixed, feedback is welcome!
We definitely need more tests for SVG rendering. I’ve added a specific check to log an error instead of crashing when a problem happens while drawing SVG files. It’s not glorious but it’s better than a crash, and all browsers do that. |
Thanks for the fix. Tested it with the current main branch, and it works. Kudos for the really quick response and fix 👍 |
With the newest version
61.0
I get the following error:AttributeError: 'Node' object has no attribute 'text_bounding_box'. Did you mean: 'bounding_box'?
Version
60.2
works fine.Can't really tell how to reproduce this, as weasyprint is indirectly used by Sphinx-SimplePDF.
Sphinx-SimplePDF creates a SingleHTML-Page of a Sphinx documentation and then let weasyprint "translate" this page to PDF.
Complete traceback:
The text was updated successfully, but these errors were encountered: