Skip to content

Instantly share code, notes, and snippets.

@Elwell
Created January 13, 2021 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Elwell/212a19271def21b1176640502e76fc2e to your computer and use it in GitHub Desktop.
Save Elwell/212a19271def21b1176640502e76fc2e to your computer and use it in GitHub Desktop.
root@zero-1:~# python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tesserocr
!strcmp(locale, "C"):Error:Assert failed:in file baseapi.cpp, line 209
Segmentation fault
root@zero-1:~# dpkg -l | grep tess
ii libtesseract4:armhf 4.0.0-2 armhf Tesseract OCR library
ii python3-tesserocr 2.4.0-4 armhf Python wrapper for the tesseract-ocr API (Python3 version)
ii tesseract-ocr 4.0.0-2 armhf Tesseract command line OCR tool
ii tesseract-ocr-eng 1:4.00~git30-7274cfa-1 all tesseract-ocr language files for English
ii tesseract-ocr-osd 1:4.00~git30-7274cfa-1 all tesseract-ocr language files for script and orientation
root@zero-1:~#
@Elwell
Copy link
Author

Elwell commented Jan 13, 2021

root@zero-1:~# python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import locale
locale.setlocale(locale.LC_ALL, 'C')
'C'
import tesserocr

sirfz/tesserocr#165 had the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment