Issue with doc.close()
not closing the document in PyMuPDF
#3039
Labels
fix developed
release schedule to be determined
doc.close()
not closing the document in PyMuPDF
#3039
Description of the bug
Hello PyMuPDF community,
I am encountering an issue with PyMuPDF where a PDF file, once opened using
fitz.open
, does not close properly even after callingdoc.close()
. This is causing my Python script to not terminate as expected.Steps to Reproduce:
doc = fitz.open(pdf_path)
doc.close()
print(doc.is_closed)
Expected Behavior:
The
doc.is_closed
should returnTrue
after callingdoc.close()
.Actual Behavior:
The
doc.is_closed
returnsFalse
, indicating that the document remains open. As a result, my Python script does not terminate properly.Environment:
Additional Information:
Any assistance in resolving this issue would be greatly appreciated. Thank you in advance for your help.
How to reproduce the bug
The bug can be reproduced following the code i have provided in my main message
PyMuPDF version
Built from source
Operating system
Linux
Python version
3.11
The text was updated successfully, but these errors were encountered: