-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stripped "\" from Windows Tessdata Path #356
Labels
Comments
Hi @tallsmallone |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When trying to run pytesseract from a windows 10 environment, I found that the config was stripping the
\
in my tessdata path.I found that the solution to fix this was in pytesseract.py: line 251:
To confirm it was the issue, here was the config before this section of code:
--tessdata-dir E:\Projects\fhm-test-automation\tessdata --oem 3 --psm 3
And after the shlex.split(), the cmd_args was now:
['tesseract', 'C:\\Users\\nickr\\AppData\\Local\\Temp\\tess_ai78chdv.PNG', 'C:\\Users\\nickr\\AppData\\Local\\Temp\\tess_ai78chdv', '-l', 'eng', '--tessdata-dir', 'E:Projectsfhm-test-automationtessdata', '--oem', '3', '--psm', '3']
Please note that I truncated off the extra, unneeded information.
As you can see, the
--tessdata-dir
was altered, thus giving the dreadedTESSDATA_PREFIX
error.I would make a PR myself, but I do not know enough about the system to know the consequences on my actions.
The text was updated successfully, but these errors were encountered: