We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d239e0 commit a25b61bCopy full SHA for a25b61b
core/utils/image_utils.py
@@ -109,4 +109,5 @@ def get_text(image_path):
109
image = Image.open(image_path).convert('LA')
110
row_text = pytesseract.image_to_string(image, lang='eng',
111
config="-c tessedit_char_whitelist=%s_-." % char_whitelist).strip()
112
- return "".join([s for s in row_text.splitlines(True) if s.strip()])
+ text = "".join([s for s in row_text.splitlines(True) if s.strip()])
113
+ return text.encode(encoding='utf-8', errors='ignore')
0 commit comments