Tesseract.TesseractException: Failed to initialise tesseract engine [Please help ...]

420 views
Skip to first unread message

Justin Yeh

unread,
Feb 27, 2020, 11:07:58 AM2/27/20
to tesseract-ocr
I followed every step on charlesw's page: https://github.com/charlesw/tesseract/  but still got the initialise error as title said. 

I have installed Visual C++ Redistributable for Visual Studio 2015 on my x86 laptop.

I use visual studio 2013 to develop a form project with a reference of tesseract 3.3.0 added from nuget (copy to local directory has been set]

I've downloaded all eng files and put them into a folder named tessdata and added in my project [copy to local directory has been set]


I use following code to ensure that language data path does not end with a / or \ character.

string strTemplatePath = (new FileInfo(this.GetType().Assembly.Location)).DirectoryName;
tessdata = Path.Combine(strTemplatePath, "tessdata");


Charlesw mentioned that language files must be a correct version for tesseract 3.3.0 or, it will not work. The weird thing is that on his page: https://github.com/charlesw/tesseract/ at "Getting started quickly section", he said that "Download language data files for tesseract 3.05" but the link actually link to 3.04.00.zip instead. I am not sure if that is the cause for the issue


The weird thing is that, when I tried it on debug mode, it works perfectly. However, if I deploy the clickonce, issue pops up: "Tesseract.TesseractException: Failed to initialise tesseract engine."


I have checked the page: https://github.com/charlesw/tesseract/wiki/Error-1 for details. trying to figure out any missing part for days with no luck.


Please help ....Any idea or suggestion is welcome here !



Reply all
Reply to author
Forward
0 new messages