Closed patle22cute closed 3 days ago
Can you please provide more details on which OCR engine you are using?
I use TesseractCliOcrOptions.
This OCR engine requires writing temporary files to the disk. The files are saved in the temporary location provided by the Python tempfile
module.
If your user doesn't have write permissions in that folder, you might be able to provide another location via the TMPDIR
environment variable.
See the documentation of the tempfile.gettempdir()
function.
thanks for your response, I've checked the permission carefully, the error seems that this .png file is being opened by a function, I've tried adding: if os.path.exists(fname): os.remove(fname) before the save step, the program runs normally. And let me ask more, is there any support for detecting horizontal rotation for this version 2.5.2 and how to add train language file. thank @dolfim-ibm .
Good, happy you could solve your issue.
Regarding your questions:
Bug
PermissionError: [Errno 13] Permission denied: 'C:\Users\Dell\AppData\Local\Temp\tempxxxxx.png'
Steps to reproduce
unable to run Force full page OCR. in line: fp = builtins.open(filename, "w+b")
Docling version
2.5.2
Python version
3.11