Error trying to OCR pdf
myfta opened this issue · 6 comments
I am able OCR image files (png and jpg) however if I try to OCR a pdf I get the following error:
(This is the last line of the error output)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\%UserProfile%\AppData\Local\Temp\tmprh5t8yf9'
Any ideas anyone?
@myfta Could you try if you get the error also when the add-preview
is set to no
?
--add-preview=no
It does not like --add-preview
and responds:
Error: no such option: --add-preview Did you mean --add-previews?
So I tried both --add-previews=no
and --add-previews=off
both return the same permission error
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
I've had the same error but fixed it in the code. I'm going to do a pull request soon.
I downloaded the version from your repo @harun27, but both yours and @plamola say version 0.2.3. Are they the same? Should it now work for pdfs?
I'm still getting the same error:
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\graha\\AppData\\Local\\Temp\\tmpyslu8whn'
I just haven't changed the version but they are not the same. In my code, I close the file before continuing. That was the problem in @plamola's which worked out for me. I am not sure why it doesn't work for you. Maybe you could look whether there are other processes that use the pdf file?
Installing your version over the top of the previous one seemed to be the problem. So I uninstalled the package completely and re-installed yours. Works on PDFs now, Multi-page too. Yay!