-
Notifications
You must be signed in to change notification settings - Fork 566
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 using fitz.IRect #3163
Comments
Thanks for the report. This looks like an assert that is too strict - it fails if we try to construct an IRect from floating point values. I have a fix in my tree. |
Instead of simply typecasting, it seems more optimal to round to the nearest decimal and then return as a typecasted int.
HI @julian-smith-artifex-com , I am trying to add a PR #3167 to improve on this. But I am unsure how to sign the CLA. Can you please help? |
Hi @psambit9791. You need to post a comment on the PR that says:
|
Fixed in 1.23.23. |
Background
I am using a column-by-column parsing of PDF text as described in this link from the pymupdf repository . This has a segment where
fitz.IRect
is called using bounding box values. On running the code, I get assertion error from the convert(x) function.To Recreate:
Stacktrace:
How to reproduce the bug
PyMuPDF version
1.23.22
Operating system
MacOS
Python version
3.10
The text was updated successfully, but these errors were encountered: