Open nithinreddyyyyyy opened 1 year ago
yes please i am having the same issue
Having the same issue
guys i ran it on replit and the issue got resolved, idk y, byt the problem is replit doesn't support pytesseract
i am trying some alternatives , ill let u know if solved
till then please continue doing your research
It is working in local, as in I changed the code from streamlit to normal python code and tried ran. It's running, i'm unsure what's the issue with streamlit
Its not working for me. did you install something called tesseract?
Its not working for me. did you install something called tesseract?
Yes, try to install tesseract and load that tesseract.exe in the environment (system variables), try install pytesseract with pip and conda and load the tesseract.exe file after importing all the libraries in the python code, below is the example
pytesseract.pytesseract.tesseract_cmd = r'C:\Users\USER\AppData\Local\Tesseract-OCR\tesseract.exe'
Its not working for me. did you install something called tesseract?
Yes, try to install tesseract and load that tesseract.exe in the environment (system variables), try install pytesseract with pip and conda and load the tesseract.exe file after importing all the libraries in the python code, below is the example
pytesseract.pytesseract.tesseract_cmd = r'C:\Users\USER\AppData\Local\Tesseract-OCR\tesseract.exe'
is this running pytesseract for you on replit?
Its not working for me. did you install something called tesseract?
Yes, try to install tesseract and load that tesseract.exe in the environment (system variables), try install pytesseract with pip and conda and load the tesseract.exe file after importing all the libraries in the python code, below is the example
pytesseract.pytesseract.tesseract_cmd = r'C:\Users\USER\AppData\Local\Tesseract-OCR\tesseract.exe'
is this running pytesseract for you on replit?
I use pycharm, unsure about replit.
i have the exact same issue and my guess is coming from streamlit, using python/flask work properly
raise PdfiumError(f"Failed to load document (PDFium: {pdfium_i.ErrorToStr.get(err_code)}).") pypdfium2._helpers.misc.PdfiumError: Failed to load document (PDFium: File access error).
I'm somewhat of a coding noob - but I think the problem is the Temp file(s) that are created (and the path to them) are removed when the 'with NamedTemporaryFile(dir='.', suffix='.csv') as f:' block is exited.
If I force the uploaded files to persist e.g. 'With NamedTemporaryFile(dir='.', suffix='.csv', delete=False) as f:' - then the url passed to Pdfium is valid and I get no errors. I'm sure there's a more elegant solution though - as you'd need to handle the removal of the temp files
I tried running the same python code which you uploaded in this repo, below is the code
But while uploading the pdf file in streamlit app, it is returning below error
PdfiumError: Failed to load document (PDFium: File access error).
Can you please let me know how to fix this error?