0

I am trying to merge two PDFs using PyPDF2. Sometimes I run into the following error: [WinError 32] The process cannot access the file because it is being used by another process: How can I determine which process is using the file?

Thank you

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Nick Ysidron
  • 36
  • 1
  • 10
  • See https://superuser.com/questions/117902/find-out-which-process-is-locking-a-file-or-folder-in-windows. – mkrieger1 Feb 26 '19 at 14:53
  • Please update your question with the source code you have written for this program. – quamrana Feb 26 '19 at 15:11
  • Note that it could be due to the PyPDF2 process itself. The error message for a sharing violation is very misleading (and should have been fixed 20 years ago). A file's share mode has absolutely nothing to do with a process. It's related only to previous opens that requested any kind of data access (read/execute, write/append, or delete). – Eryk Sun Feb 26 '19 at 21:26

1 Answers1

0

You might have already tried this, but try to find the handle or the DLL ; a dialogue box will open and allow you to search for the missing file. If you want to open a file in Python, search up a file handling cheat-sheet. It doesn't require any importing of modules, just the Open() function. Glad to help if i did