fitz.open() - Python keeps file open #1547
-
Hi, How can I open this file only for reading? EDIT |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 13 replies
-
that is a problem in the current version |
Beta Was this translation helpful? Give feedback.
-
PyMuPDF-1.19.5-cp39-cp39-win_amd64.zip Unzip and execute |
Beta Was this translation helpful? Give feedback.
-
I have this issue with 1.22.1 |
Beta Was this translation helpful? Give feedback.
-
I have another question about fitz.open() with html. files = request.files.getlist("file") |
Beta Was this translation helpful? Give feedback.
Your code is minimal and I am not sure where the files really exist you want to open.
But maybe this is an explanation:
To open a document with PyMuPDF, then this must either be a file existing on local drives, or it must be a memory area in formta of the respective document.
PyMuPDF does not access the internet as part of
fitz.open()
. You must first download any internet-resident file e.g., to a memory area (not necessarily to disk).That maybe explains it.