-
Notifications
You must be signed in to change notification settings - Fork 556
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
SystemError: <built-in function TextPage_extractIMGINFO> returned a result with an exception set #2905
Comments
We are in the process of migrating PyMuPDF to a new architecture. This implementation is available already now under the import statement import fitz_new as fitz
doc=fitz.open("test.pdf")
page=doc[115]
for img in page.get_images():
print(page.get_image_rects(img))
[Rect(-9.0, -9.89996337890625, 1270.400146484375, 833.0001220703125)]
[Rect(619.5001220703125, 45.3999137878418, 642.35009765625, 76.84991455078125)]
[Rect(255.75010681152344, 572.2999877929688, 364.2001037597656, 662.0999755859375)] |
The reason for failure in the classic implementation is the use of non-UTF8 characters in the colorspace name of image xref 2054 on that page. So an alternative Python method to make the respective string object is an easy solution. print(doc.xref_object(4516))
[ /Separation /#BA#DA#C9#AB /DeviceCMYK 4517 0 R ] The |
Thanks for your reply , but i have a question |
You can use Early next year (first two weeks), the final migration step will take place - such that you again can simply say |
Fixed in 1.23.9 where |
Description of the bug
when i use the api page.get_image_rects,there is a SystemError: returned a result with an exception set
How to reproduce the bug
pdf file:
https://drive.google.com/file/d/1yCwGVTOwRSXvHCzNC0C0dsVJLQI-p2ZM/view
page_id:115(page_id start from 0)
my code like this demo
there is stack when i meet this error
PyMuPDF version
1.23.7
Operating system
Windows
Python version
3.11
The text was updated successfully, but these errors were encountered: