Skip to content
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

Fix permission denied while writing to temporary file on Windows #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TobiGr
Copy link

@TobiGr TobiGr commented Oct 6, 2024

This was caused by the file already being opened when instantiating the NamedTemporaryFile. Windows cannot handle this. See https://docs.python.org/3/library/tempfile.html#tempfile.NamedTemporaryFile and https://stackoverflow.com/a/23212515

This should fix johndoe31415/pdfminify#17. However, I usually do not code in python. Therefore review and test my changes carefully. I did not find any tests related to the method.
⚠️ These changes are untested because I lack the setup. ⚠️

This was caused by the file already being opened when instantiating the NamedTemporaryFile. Windows cannot handle this. See https://docs.python.org/3/library/tempfile.html#tempfile.NamedTemporaryFile and https://stackoverflow.com/a/23212515
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Windows 10] Permission denied
1 participant