tesserocr icon indicating copy to clipboard operation
tesserocr copied to clipboard

UnicodeDecodeError after converted the program to EXE using Cython

Open redstoneleo opened this issue 6 years ago • 0 comments

I followed the commands here to convert my program , which used tesserocr, to EXE , however , when run the executable I got the following exception :

D:\test\EngkuDict>MainWindow.exe
Traceback (most recent call last):
  File "MainWindow.py", line 22, in init EngkuDict.MainWindow
    import Utils,OCR,MdictLookup
  File "D:\test\EngkuDict\OCR.py", line 4, i
n <module>
    import tesserocr
  File "C:\Users\i\AppData\Local\Programs\Python\Python36-32\lib\site-packages\t
esserocr\__init__.py", line 1, in <module>
    from ._tesserocr import *
  File "tesserocr.pyx", line 52, in init tesserocr._tesserocr
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb1 in position 20: invalid
 start byte

However , I cannot see any codec related code in https://github.com/sirfz/tesserocr/blob/master/tesserocr.pyx#L52 So what's wrong ?

redstoneleo avatar Jun 02 '19 12:06 redstoneleo