PermissionError: [WinError 32] The process cannot access the file because it is being used by another process
See original GitHub issueDescribe the bug
I get the error PermissionError: [WinError 32] The process cannot access the file because it is being used by another process
To Reproduce Steps to reproduce the behavior:
- pip install pdf2image
- Run the following code
with tempfile.TemporaryDirectory() as path:
images_from_path = convert_from_path(data_path, output_folder=path)
- See error
Traceback (most recent call last):
File "...\lib\tempfile.py", line 803, in onerror
_os.unlink(path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: '...\\AppData\\Local\\Temp\\tmppglie128\\ad47d7e6-b50f-4bb9-ad12-533e4e25b4a9-001.ppm'
Desktop (please complete the following information):
- OS: Windows
- Version 1.13.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
[WinError 32] The process cannot access the file because it is ...
PermissionError : [WinError 32] The process cannot access the file because it is being used by another process · Subscribe to RSS.
Read more >[WinError 32] The process cannot access the file because it is ...
Help with PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'newids.txt'.
Read more >os.remove permissionerror winerror 32 - You.com | The AI ...
PermissionError : [WinError 32] The process cannot access the file because it is being used by another process python python-3.x file-handling 110,020 Solution...
Read more >[WinError 32] The process cannot access the file because it is ...
PermissionError : [WinError 32] The process cannot access the file because it is being used by another process · i run debugger with...
Read more >PermissionError: [WinError 32] The process cannot access
PermissionError : [WinError 32] The process cannot access the file because it is being used by another process ... Hi there,. I proudly...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When you exit the context, the underlying image files are open in your Python process. This causes an issue because the temporary directory deletion cannot take place on Windows as it contains open files.
If you don’t use a temporary directory you won’t have this issue.
@Belval i am not using temporary directory but still getting this issue
here is my code :–
i am just creating the folder and downloading medias to it then reuploading it then want to delete that folder but it is showing this err