You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope I am not overlooking something obvious but from my experiments it seems not possible to use a character whitelist which has a spacebar in it on windows
I tried:
pytesseract.image_to_string(img, config=conf)
where conf is
"--psm 6 -c tessedit_char_whitelist=' 0123456789'"
'--psm 6 -c tessedit_char_whitelist=" 0123456789"'
"--psm 6 -c tessedit_char_whitelist=\' 0123456789\'"
'--psm 6 -c tessedit_char_whitelist=\" 0123456789\"'
none of those worked, it seems that the underlying code is running shlex.split with posix=False on windows. this makes it ALWAYS split on a spacebar ignoring quotes, I edited pytesseract's source code to set posix=True even on windows and it fixed my issue.