question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to initialise tesseract engine (Tesseract 3.0.2 - Visual Studio 2015)

See original GitHub issue

Hi and thank you very much for your help.

I have done everything that I possibly can think of to attempt to resolve a “Failed to initialise engine” error.

I read post #277 where the person stated that adjusting the path to tessdata fixed his issue. But he did not state the “adjustment” that he made.

Line where the failure occurs

using (var engine = new TesseractEngine (@“./tessdata”, “eng”, EngineMode.Default)) {

Error

“Failed to initialise tesseract engine… See https://github.com/charlesw/tesseract/wiki/Error-1 for details.”} Tesseract.TesseractException

Stack Trace

Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary {System.Collections.ListDictionaryInternal}

HResult -2146233088 int

HelpLink null string

InnerException null System.Exception

Message “Failed to initialise tesseract engine… See https://github.com/charlesw/tesseract/wiki/Error-1 for details.” string

Source “Tesseract” string

StackTrace "
at Tesseract.TesseractEngine.Initialise(String datapath, String language, EngineMode engineMode, IEnumerable1 configFiles, IDictionary2 initialValues, Boolean setOnlyNonDebugVariables)\r\n

at Tesseract.TesseractEngine…ctor(String datapath, String language, EngineMode engineMode, IEnumerable1 configFiles, IDictionary2 initialOptions, Boolean setOnlyNonDebugVariables)\r\n

at Tesseract.TesseractEngine…ctor(String datapath, String language, EngineMode engineMode)\r\n

at OCRTestOne.OCRTest.Go() in C:\Projects\SANDBOX\OCR-Test-One\OCR-Test-One\Classes\OCRTest.cs:line 22" string

TargetSite {Void Initialise(System.String, System.String, Tesseract.EngineMode, System.Collections.Generic.IEnumerable1[System.String], System.Collections.Generic.IDictionary2[System.String,System.Object], Boolean)} System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}

Development Environment

  • Windows Server 2012 R2 (virtual machine running in Azure)
  • Visual Studio 2015 (Version 14.0.25431.01 Update 3)
  • Project Type: ASP.NET (also tried console app).
  • Framework Target 452 (.NET Framework 4.5.2).
  • Verified that Visual C++ 32-bit and 64-bit runtimes are both installed
  • Nuget Package: Tesseract by Charles Weld 3.0.2
  • tessdata folder exists with English language files underneath (I added it). Files set to Copy Always.
  • 32 and 64-bit assemblies (liblept172.dll and libtesseract304.dll) exist in the x86 and x64 folders and are set to Copy Always (they seem to be copied to the lib folder).

Trace

Turned on verbose mode tracing. The trace below is based on one execution attempt (I tried to attach a text file but the site said: “We don’t support that file type”). Apologies for the long trace

Tesseract Information: 0 : Current OS: Windows Tesseract Information: 0 : Current platform: x86 Tesseract Information: 0 : Custom search path is not defined, skipping. Tesseract Information: 0 : Checking executing application domain location ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\99b032d6\fb07eb9\assembly\dl3\26c8fcd5\00342a46_d765d101’ for ‘liblept172.dll’ on platform x86. Tesseract Information: 0 : Checking current application domain location 'C:\Projects\SANDBOX\OCR-Test-One\OCR-Test-One' for ‘liblept172.dll’ on platform x86. Tesseract Information: 0 : Trying to load native library “C:\Projects\SANDBOX\OCR-Test-One\OCR-Test-One\x86\liblept172.dll”… Tesseract Information: 0 : Successfully loaded native library “C:\Projects\SANDBOX\OCR-Test-One\OCR-Test-One\x86\liblept172.dll”, handle = 325451776. Tesseract Information: 0 : Trying to load native function “pixaReadMultipageTiff” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixaReadMultipageTiff”, function handle = 325469402. Tesseract Information: 0 : Trying to load native function “pixaGetCount” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixaGetCount”, function handle = 325462092. Tesseract Information: 0 : Trying to load native function “pixaGetPix” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixaGetPix”, function handle = 325455972. Tesseract Information: 0 : Trying to load native function “pixaDestroy” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixaDestroy”, function handle = 325456927. Tesseract Information: 0 : Trying to load native function “pixCreate” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixCreate”, function handle = 325465967. Tesseract Information: 0 : Trying to load native function “pixClone” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixClone”, function handle = 325466612. Tesseract Information: 0 : Trying to load native function “pixDestroy” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixDestroy”, function handle = 325466382. Tesseract Information: 0 : Trying to load native function “pixGetWidth” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetWidth”, function handle = 325460622. Tesseract Information: 0 : Trying to load native function “pixGetHeight” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetHeight”, function handle = 325460452. Tesseract Information: 0 : Trying to load native function “pixGetDepth” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetDepth”, function handle = 325464312. Tesseract Information: 0 : Trying to load native function “pixGetXRes” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetXRes”, function handle = 325463887. Tesseract Information: 0 : Trying to load native function “pixGetYRes” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetYRes”, function handle = 325463882. Tesseract Information: 0 : Trying to load native function “pixGetResolution” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetResolution”, function handle = 325469492. Tesseract Information: 0 : Trying to load native function “pixGetWpl” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetWpl”, function handle = 325466032. Tesseract Information: 0 : Trying to load native function “pixSetXRes” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixSetXRes”, function handle = 325463907. Tesseract Information: 0 : Trying to load native function “pixSetYRes” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixSetYRes”, function handle = 325463902. Tesseract Information: 0 : Trying to load native function “pixSetResolution” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixSetResolution”, function handle = 325465697. Tesseract Information: 0 : Trying to load native function “pixScaleResolution” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixScaleResolution”, function handle = 325467282. Tesseract Information: 0 : Trying to load native function “pixGetData” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetData”, function handle = 325469052. Tesseract Information: 0 : Trying to load native function “pixGetInputFormat” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetInputFormat”, function handle = 325467712. Tesseract Information: 0 : Trying to load native function “pixSetInputFormat” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixSetInputFormat”, function handle = 325459102. Tesseract Information: 0 : Trying to load native function “pixEndianByteSwap” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixEndianByteSwap”, function handle = 325468587. Tesseract Information: 0 : Trying to load native function “pixRead” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixRead”, function handle = 325467527. Tesseract Information: 0 : Trying to load native function “pixReadMemTiff” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixReadMemTiff”, function handle = 325472137. Tesseract Information: 0 : Trying to load native function “pixWrite” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixWrite”, function handle = 325466617. Tesseract Information: 0 : Trying to load native function “pixGetColormap” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetColormap”, function handle = 325464692. Tesseract Information: 0 : Trying to load native function “pixSetColormap” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixSetColormap”, function handle = 325468467. Tesseract Information: 0 : Trying to load native function “pixDestroyColormap” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixDestroyColormap”, function handle = 325465782. Tesseract Information: 0 : Trying to load native function “pixConvertRGBToGray” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixConvertRGBToGray”, function handle = 325460777. Tesseract Information: 0 : Trying to load native function “pixDeskewGeneral” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixDeskewGeneral”, function handle = 325460177. Tesseract Information: 0 : Trying to load native function “pixRotate” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixRotate”, function handle = 325466312. Tesseract Information: 0 : Trying to load native function “pixRotateOrth” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixRotateOrth”, function handle = 325468177. Tesseract Information: 0 : Trying to load native function “pixOtsuAdaptiveThreshold” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixOtsuAdaptiveThreshold”, function handle = 325468767. Tesseract Information: 0 : Trying to load native function “pixSauvolaBinarize” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixSauvolaBinarize”, function handle = 325463922. Tesseract Information: 0 : Trying to load native function “pixSauvolaBinarizeTiled” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixSauvolaBinarizeTiled”, function handle = 325461412. Tesseract Information: 0 : Trying to load native function “pixScale” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixScale”, function handle = 325466597. Tesseract Information: 0 : Trying to load native function “pixcmapCreate” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapCreate”, function handle = 325462397. Tesseract Information: 0 : Trying to load native function “pixcmapCreateRandom” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapCreateRandom”, function handle = 325460482. Tesseract Information: 0 : Trying to load native function “pixcmapCreateLinear” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapCreateLinear”, function handle = 325460392. Tesseract Information: 0 : Trying to load native function “pixcmapCopy” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapCopy”, function handle = 325463212. Tesseract Information: 0 : Trying to load native function “pixcmapDestroy” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapDestroy”, function handle = 325464252. Tesseract Information: 0 : Trying to load native function “pixcmapGetCount” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetCount”, function handle = 325466562. Tesseract Information: 0 : Trying to load native function “pixcmapGetFreeCount” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetFreeCount”, function handle = 325456837. Tesseract Information: 0 : Trying to load native function “pixcmapGetDepth” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetDepth”, function handle = 325468462. Tesseract Information: 0 : Trying to load native function “pixcmapGetMinDepth” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetMinDepth”, function handle = 325462157. Tesseract Information: 0 : Trying to load native function “pixcmapClear” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapClear”, function handle = 325460977. Tesseract Information: 0 : Trying to load native function “pixcmapAddColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapAddColor”, function handle = 325466517. Tesseract Information: 0 : Trying to load native function “pixcmapAddNewColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapAddNewColor”, function handle = 325459832. Tesseract Information: 0 : Trying to load native function “pixcmapAddNearestColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapAddNearestColor”, function handle = 325464897. Tesseract Information: 0 : Trying to load native function “pixcmapUsableColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapUsableColor”, function handle = 325468852. Tesseract Information: 0 : Trying to load native function “pixcmapAddBlackOrWhite” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapAddBlackOrWhite”, function handle = 325460002. Tesseract Information: 0 : Trying to load native function “pixcmapSetBlackAndWhite” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapSetBlackAndWhite”, function handle = 325456282. Tesseract Information: 0 : Trying to load native function “pixcmapGetColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetColor”, function handle = 325466527. Tesseract Information: 0 : Trying to load native function “pixcmapGetColor32” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetColor32”, function handle = 325458992. Tesseract Information: 0 : Trying to load native function “pixcmapResetColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapResetColor”, function handle = 325457197. Tesseract Information: 0 : Trying to load native function “pixcmapGetIndex” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetIndex”, function handle = 325466567. Tesseract Information: 0 : Trying to load native function “pixcmapHasColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapHasColor”, function handle = 325458122. Tesseract Information: 0 : Trying to load native function “pixcmapCountGrayColors” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapCountGrayColors”, function handle = 325462272. Tesseract Information: 0 : Trying to load native function “pixcmapCountGrayColors” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapCountGrayColors”, function handle = 325462272. Tesseract Information: 0 : Trying to load native function “pixcmapGetNearestIndex” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetNearestIndex”, function handle = 325459557. Tesseract Information: 0 : Trying to load native function “pixcmapGetNearestGrayIndex” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetNearestGrayIndex”, function handle = 325466522. Tesseract Information: 0 : Trying to load native function “pixcmapGetComponentRange” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetComponentRange”, function handle = 325459077. Tesseract Information: 0 : Trying to load native function “pixcmapGetExtremeValue” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetExtremeValue”, function handle = 325458877. Tesseract Information: 0 : Trying to load native function “pixcmapGrayToColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGrayToColor”, function handle = 325464607. Tesseract Information: 0 : Trying to load native function “pixcmapColorToGray” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapColorToGray”, function handle = 325469397. Tesseract Information: 0 : Trying to load native function “pixcmapColorToGray” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapColorToGray”, function handle = 325469397. Tesseract Information: 0 : Trying to load native function “pixcmapToRGBTable” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapToRGBTable”, function handle = 325469742. Tesseract Information: 0 : Trying to load native function “pixcmapSerializeToMemory” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapSerializeToMemory”, function handle = 325465572. Tesseract Information: 0 : Trying to load native function “pixcmapDeserializeFromMemory” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapDeserializeFromMemory”, function handle = 325460637. Tesseract Information: 0 : Trying to load native function “pixcmapGammaTRC” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGammaTRC”, function handle = 325470952. Tesseract Information: 0 : Trying to load native function “pixcmapContrastTRC” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapContrastTRC”, function handle = 325462497. Tesseract Information: 0 : Trying to load native function “pixcmapShiftIntensity” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapShiftIntensity”, function handle = 325460387. Tesseract Information: 0 : Current platform: x86 Tesseract Information: 0 : Custom search path is not defined, skipping. Tesseract Information: 0 : Checking executing application domain location ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\99b032d6\fb07eb9\assembly\dl3\26c8fcd5\00342a46_d765d101’ for ‘libtesseract304.dll’ on platform x86. Tesseract Information: 0 : Checking current application domain location 'C:\Projects\SANDBOX\OCR-Test-One\OCR-Test-One' for ‘libtesseract304.dll’ on platform x86. Tesseract Information: 0 : Trying to load native library “C:\Projects\SANDBOX\OCR-Test-One\OCR-Test-One\x86\libtesseract304.dll”… Tesseract Information: 0 : Successfully loaded native library “C:\Projects\SANDBOX\OCR-Test-One\OCR-Test-One\x86\libtesseract304.dll”, handle = 329383936. Tesseract Information: 0 : Trying to load native function “TessBaseAPIAnalyseLayout” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIAnalyseLayout”, function handle = 329706928. Tesseract Information: 0 : Trying to load native function “TessBaseAPIClear” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIClear”, function handle = 329706560. Tesseract Information: 0 : Trying to load native function “TessBaseAPICreate” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPICreate”, function handle = 329709952. Tesseract Information: 0 : Trying to load native function “TessBaseAPIDelete” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIDelete”, function handle = 329709920. Tesseract Information: 0 : Trying to load native function “TessBaseAPIDetectOS” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIDetectOS”, function handle = 329706368. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetBoolVariable” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetBoolVariable”, function handle = 329709264. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetDoubleVariable” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetDoubleVariable”, function handle = 329709184. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetHOCRText” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetHOCRText”, function handle = 329706736. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetIntVariable” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetIntVariable”, function handle = 329709344. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetIterator” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetIterator”, function handle = 329706784. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetPageSegMode” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetPageSegMode”, function handle = 329707728. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetStringVariable” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetStringVariable”, function handle = 329709104. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetThresholdedImage” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetThresholdedImage”, function handle = 329707312. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetUTF8Text” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetUTF8Text”, function handle = 329706752. Tesseract Information: 0 : Trying to load native function “TessBaseAPIInit4” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIInit4”, function handle = 329708688. Tesseract Information: 0 : Trying to load native function “TessBaseAPIMeanTextConf” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIMeanTextConf”, function handle = 329706688. Tesseract Information: 0 : Trying to load native function “TessBaseAPIRecognize” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIRecognize”, function handle = 329706912. Tesseract Information: 0 : Trying to load native function “TessBaseAPISetDebugVariable” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPISetDebugVariable”, function handle = 329709424. Tesseract Information: 0 : Trying to load native function “TessBaseAPISetImage2” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPISetImage2”, function handle = 329707536. Tesseract Information: 0 : Trying to load native function “TessBaseAPISetInputName” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPISetInputName”, function handle = 329709840. Tesseract Information: 0 : Trying to load native function “TessBaseAPISetPageSegMode” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPISetPageSegMode”, function handle = 329707760. Tesseract Information: 0 : Trying to load native function “TessBaseAPISetRectangle” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPISetRectangle”, function handle = 329707440. Tesseract Information: 0 : Trying to load native function “TessBaseAPISetVariable” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPISetVariable”, function handle = 329709504. Tesseract Information: 0 : Trying to load native function “TessDeleteBlockList” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessDeleteBlockList”, function handle = 329710688. Tesseract Information: 0 : Trying to load native function “TessDeleteIntArray” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessDeleteIntArray”, function handle = 329710720. Tesseract Information: 0 : Trying to load native function “TessDeleteText” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessDeleteText”, function handle = 329710784. Tesseract Information: 0 : Trying to load native function “TessDeleteTextArray” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessDeleteTextArray”, function handle = 329710736. Tesseract Information: 0 : Trying to load native function “TessVersion” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessVersion”, function handle = 329710800. Tesseract Information: 0 : Trying to load native function “TessPageIteratorBaseline” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorBaseline”, function handle = 329705472. Tesseract Information: 0 : Trying to load native function “TessPageIteratorBegin” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorBegin”, function handle = 329705760. Tesseract Information: 0 : Trying to load native function “TessPageIteratorBlockType” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorBlockType”, function handle = 329705568. Tesseract Information: 0 : Trying to load native function “TessPageIteratorBoundingBox” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorBoundingBox”, function handle = 329705616. Tesseract Information: 0 : Trying to load native function “TessPageIteratorCopy” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorCopy”, function handle = 329705776. Tesseract Information: 0 : Trying to load native function “TessPageIteratorDelete” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorDelete”, function handle = 329705808. Tesseract Information: 0 : Trying to load native function “TessPageIteratorGetBinaryImage” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorGetBinaryImage”, function handle = 329705552. Tesseract Information: 0 : Trying to load native function “TessPageIteratorGetImage” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorGetImage”, function handle = 329705520. Tesseract Information: 0 : Trying to load native function “TessPageIteratorIsAtBeginningOf” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorIsAtBeginningOf”, function handle = 329705696. Tesseract Information: 0 : Trying to load native function “TessPageIteratorIsAtFinalElement” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorIsAtFinalElement”, function handle = 329705664. Tesseract Information: 0 : Trying to load native function “TessPageIteratorNext” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorNext”, function handle = 329705728. Tesseract Information: 0 : Trying to load native function “TessPageIteratorOrientation” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorOrientation”, function handle = 329705440. Tesseract Information: 0 : Trying to load native function “TessResultIteratorCopy” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessResultIteratorCopy”, function handle = 329705200. Tesseract Information: 0 : Trying to load native function “TessResultIteratorDelete” from the library with handle 329383936…

– Again the log is from one run (one attempt to execute the single line of code listed at the start of this post).

Conclusion

I am a very experienced programmer (have done win32 to cloud). I spent about 5 hours trying to get this to work without success. One thing I notice is that the log seems to end on TessResultIteratorDelete, and in some cases it starts to print the next line but stops midway (prints “Tesseract Information: 0 : Successfully”, or “Tesseract Information: 0 : S”).

Any help that you can offer would be greatly appreciated (the more specific the better).

Thank you very much again.

Best, Conrad

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
charleswcommented, Feb 17, 2017

My guess is that the actual tessdata path isn’t what you expect. I’d strongly recommend using absolute paths, especially for ASP.NET applications, in this case Server.MapPath(“~\tessdata”) should do the trick.

Note that’s just of the top my head so the syntax may not be 100% correct 😉

On Fri, 17 Feb 2017, 16:56 Conrad-S, notifications@github.com wrote:

Hi and thank you very much for your help.

I have done everything that I possibly can think of to attempt to resolve a “Failed to initialise engine” error.

I read post #277 https://github.com/charlesw/tesseract/issues/277 where the person stated that adjusting the path to tessdata fixed his issue. But he did not state the “adjustment” that he made. Line where the failure occurs

using (var engine = new TesseractEngine (@“./tessdata”, “eng”, EngineMode.Default)) { Error

“Failed to initialise tesseract engine… See https://github.com/charlesw/tesseract/wiki/Error-1 for details.”} Tesseract.TesseractException Stack Trace

Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary {System.Collections.ListDictionaryInternal} HResult -2146233088 int HelpLink null string InnerException null System.Exception Message “Failed to initialise tesseract engine… See https://github.com/charlesw/tesseract/wiki/Error-1 for details.” string Source “Tesseract” string StackTrace " at Tesseract.TesseractEngine.Initialise(String datapath, String language, EngineMode engineMode, IEnumerable1 configFiles, IDictionary2 initialValues, Boolean setOnlyNonDebugVariables)\r\n at Tesseract.TesseractEngine…ctor(String datapath, String language, EngineMode engineMode, IEnumerable1 configFiles, IDictionary2 initialOptions, Boolean setOnlyNonDebugVariables)\r\n at Tesseract.TesseractEngine…ctor(String datapath, String language, EngineMode engineMode)\r\n at OCRTestOne.OCRTest.Go() in C:\Projects\SANDBOX\OCR-Test-One\OCR-Test-One\Classes\OCRTest.cs:line 22" string TargetSite {Void Initialise(System.String, System.String, Tesseract.EngineMode, System.Collections.Generic.IEnumerable1[System.String], System.Collections.Generic.IDictionary2[System.String,System.Object], Boolean)} System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo} Development Environment

  • Windows Server 2012 R2 (virtual machine running in Azure)
  • Visual Studio 2015 (Version 14.0.25431.01 Update 3)
  • Project Type: ASP.NET (also tried console app).
  • Framework Target 452 (.NET Framework 4.5.2).
  • Verified that Visual C++ 32-bit and 64-bit runtimes are both installed
  • Nuget Package: Tesseract by Charles Weld 3.0.2
  • tessdata folder exists with English language files underneath (I added it). Files set to Copy Always.
  • 32 and 64-bit assemblies (liblept172.dll and libtesseract304.dll) exist in the x86 and x64 folders and are set to Copy Always (they seem to be copied to the lib folder).

Trace

Turned on verbose mode tracing. The trace below is based on one execution attempt (I tried to attach a text file but the site said: “We don’t support that file type”). Apologies for the long trace

Tesseract Information: 0 : Current OS: Windows Tesseract Information: 0 : Current platform: x86 Tesseract Information: 0 : Custom search path is not defined, skipping. Tesseract Information: 0 : Checking executing application domain location ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\99b032d6\fb07eb9\assembly\dl3\26c8fcd5\00342a46_d765d101’ for ‘liblept172.dll’ on platform x86. Tesseract Information: 0 : Checking current application domain location ‘C:\Projects\SANDBOX\OCR-Test-One\OCR-Test-One’ for ‘liblept172.dll’ on platform x86. Tesseract Information: 0 : Trying to load native library “C:\Projects\SANDBOX\OCR-Test-One\OCR-Test-One\x86\liblept172.dll”… Tesseract Information: 0 : Successfully loaded native library “C:\Projects\SANDBOX\OCR-Test-One\OCR-Test-One\x86\liblept172.dll”, handle = 325451776. Tesseract Information: 0 : Trying to load native function “pixaReadMultipageTiff” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixaReadMultipageTiff”, function handle = 325469402. Tesseract Information: 0 : Trying to load native function “pixaGetCount” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixaGetCount”, function handle = 325462092. Tesseract Information: 0 : Trying to load native function “pixaGetPix” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixaGetPix”, function handle = 325455972. Tesseract Information: 0 : Trying to load native function “pixaDestroy” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixaDestroy”, function handle = 325456927. Tesseract Information: 0 : Trying to load native function “pixCreate” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixCreate”, function handle = 325465967. Tesseract Information: 0 : Trying to load native function “pixClone” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixClone”, function handle = 325466612. Tesseract Information: 0 : Trying to load native function “pixDestroy” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixDestroy”, function handle = 325466382. Tesseract Information: 0 : Trying to load native function “pixGetWidth” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetWidth”, function handle = 325460622. Tesseract Information: 0 : Trying to load native function “pixGetHeight” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetHeight”, function handle = 325460452. Tesseract Information: 0 : Trying to load native function “pixGetDepth” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetDepth”, function handle = 325464312. Tesseract Information: 0 : Trying to load native function “pixGetXRes” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetXRes”, function handle = 325463887. Tesseract Information: 0 : Trying to load native function “pixGetYRes” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetYRes”, function handle = 325463882. Tesseract Information: 0 : Trying to load native function “pixGetResolution” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetResolution”, function handle = 325469492. Tesseract Information: 0 : Trying to load native function “pixGetWpl” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetWpl”, function handle = 325466032. Tesseract Information: 0 : Trying to load native function “pixSetXRes” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixSetXRes”, function handle = 325463907. Tesseract Information: 0 : Trying to load native function “pixSetYRes” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixSetYRes”, function handle = 325463902. Tesseract Information: 0 : Trying to load native function “pixSetResolution” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixSetResolution”, function handle = 325465697. Tesseract Information: 0 : Trying to load native function “pixScaleResolution” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixScaleResolution”, function handle = 325467282. Tesseract Information: 0 : Trying to load native function “pixGetData” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetData”, function handle = 325469052. Tesseract Information: 0 : Trying to load native function “pixGetInputFormat” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetInputFormat”, function handle = 325467712. Tesseract Information: 0 : Trying to load native function “pixSetInputFormat” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixSetInputFormat”, function handle = 325459102. Tesseract Information: 0 : Trying to load native function “pixEndianByteSwap” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixEndianByteSwap”, function handle = 325468587. Tesseract Information: 0 : Trying to load native function “pixRead” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixRead”, function handle = 325467527. Tesseract Information: 0 : Trying to load native function “pixReadMemTiff” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixReadMemTiff”, function handle = 325472137. Tesseract Information: 0 : Trying to load native function “pixWrite” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixWrite”, function handle = 325466617. Tesseract Information: 0 : Trying to load native function “pixGetColormap” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixGetColormap”, function handle = 325464692. Tesseract Information: 0 : Trying to load native function “pixSetColormap” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixSetColormap”, function handle = 325468467. Tesseract Information: 0 : Trying to load native function “pixDestroyColormap” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixDestroyColormap”, function handle = 325465782. Tesseract Information: 0 : Trying to load native function “pixConvertRGBToGray” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixConvertRGBToGray”, function handle = 325460777. Tesseract Information: 0 : Trying to load native function “pixDeskewGeneral” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixDeskewGeneral”, function handle = 325460177. Tesseract Information: 0 : Trying to load native function “pixRotate” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixRotate”, function handle = 325466312. Tesseract Information: 0 : Trying to load native function “pixRotateOrth” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixRotateOrth”, function handle = 325468177. Tesseract Information: 0 : Trying to load native function “pixOtsuAdaptiveThreshold” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixOtsuAdaptiveThreshold”, function handle = 325468767. Tesseract Information: 0 : Trying to load native function “pixSauvolaBinarize” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixSauvolaBinarize”, function handle = 325463922. Tesseract Information: 0 : Trying to load native function “pixSauvolaBinarizeTiled” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixSauvolaBinarizeTiled”, function handle = 325461412. Tesseract Information: 0 : Trying to load native function “pixScale” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixScale”, function handle = 325466597. Tesseract Information: 0 : Trying to load native function “pixcmapCreate” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapCreate”, function handle = 325462397. Tesseract Information: 0 : Trying to load native function “pixcmapCreateRandom” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapCreateRandom”, function handle = 325460482. Tesseract Information: 0 : Trying to load native function “pixcmapCreateLinear” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapCreateLinear”, function handle = 325460392. Tesseract Information: 0 : Trying to load native function “pixcmapCopy” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapCopy”, function handle = 325463212. Tesseract Information: 0 : Trying to load native function “pixcmapDestroy” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapDestroy”, function handle = 325464252. Tesseract Information: 0 : Trying to load native function “pixcmapGetCount” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetCount”, function handle = 325466562. Tesseract Information: 0 : Trying to load native function “pixcmapGetFreeCount” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetFreeCount”, function handle = 325456837. Tesseract Information: 0 : Trying to load native function “pixcmapGetDepth” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetDepth”, function handle = 325468462. Tesseract Information: 0 : Trying to load native function “pixcmapGetMinDepth” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetMinDepth”, function handle = 325462157. Tesseract Information: 0 : Trying to load native function “pixcmapClear” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapClear”, function handle = 325460977. Tesseract Information: 0 : Trying to load native function “pixcmapAddColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapAddColor”, function handle = 325466517. Tesseract Information: 0 : Trying to load native function “pixcmapAddNewColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapAddNewColor”, function handle = 325459832. Tesseract Information: 0 : Trying to load native function “pixcmapAddNearestColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapAddNearestColor”, function handle = 325464897. Tesseract Information: 0 : Trying to load native function “pixcmapUsableColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapUsableColor”, function handle = 325468852. Tesseract Information: 0 : Trying to load native function “pixcmapAddBlackOrWhite” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapAddBlackOrWhite”, function handle = 325460002. Tesseract Information: 0 : Trying to load native function “pixcmapSetBlackAndWhite” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapSetBlackAndWhite”, function handle = 325456282. Tesseract Information: 0 : Trying to load native function “pixcmapGetColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetColor”, function handle = 325466527. Tesseract Information: 0 : Trying to load native function “pixcmapGetColor32” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetColor32”, function handle = 325458992. Tesseract Information: 0 : Trying to load native function “pixcmapResetColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapResetColor”, function handle = 325457197. Tesseract Information: 0 : Trying to load native function “pixcmapGetIndex” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetIndex”, function handle = 325466567. Tesseract Information: 0 : Trying to load native function “pixcmapHasColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapHasColor”, function handle = 325458122. Tesseract Information: 0 : Trying to load native function “pixcmapCountGrayColors” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapCountGrayColors”, function handle = 325462272. Tesseract Information: 0 : Trying to load native function “pixcmapCountGrayColors” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapCountGrayColors”, function handle = 325462272. Tesseract Information: 0 : Trying to load native function “pixcmapGetNearestIndex” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetNearestIndex”, function handle = 325459557. Tesseract Information: 0 : Trying to load native function “pixcmapGetNearestGrayIndex” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetNearestGrayIndex”, function handle = 325466522. Tesseract Information: 0 : Trying to load native function “pixcmapGetComponentRange” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetComponentRange”, function handle = 325459077. Tesseract Information: 0 : Trying to load native function “pixcmapGetExtremeValue” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGetExtremeValue”, function handle = 325458877. Tesseract Information: 0 : Trying to load native function “pixcmapGrayToColor” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGrayToColor”, function handle = 325464607. Tesseract Information: 0 : Trying to load native function “pixcmapColorToGray” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapColorToGray”, function handle = 325469397. Tesseract Information: 0 : Trying to load native function “pixcmapColorToGray” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapColorToGray”, function handle = 325469397. Tesseract Information: 0 : Trying to load native function “pixcmapToRGBTable” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapToRGBTable”, function handle = 325469742. Tesseract Information: 0 : Trying to load native function “pixcmapSerializeToMemory” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapSerializeToMemory”, function handle = 325465572. Tesseract Information: 0 : Trying to load native function “pixcmapDeserializeFromMemory” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapDeserializeFromMemory”, function handle = 325460637. Tesseract Information: 0 : Trying to load native function “pixcmapGammaTRC” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapGammaTRC”, function handle = 325470952. Tesseract Information: 0 : Trying to load native function “pixcmapContrastTRC” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapContrastTRC”, function handle = 325462497. Tesseract Information: 0 : Trying to load native function “pixcmapShiftIntensity” from the library with handle 325451776… Tesseract Information: 0 : Successfully loaded native function “pixcmapShiftIntensity”, function handle = 325460387. Tesseract Information: 0 : Current platform: x86 Tesseract Information: 0 : Custom search path is not defined, skipping. Tesseract Information: 0 : Checking executing application domain location ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\99b032d6\fb07eb9\assembly\dl3\26c8fcd5\00342a46_d765d101’ for ‘libtesseract304.dll’ on platform x86. Tesseract Information: 0 : Checking current application domain location ‘C:\Projects\SANDBOX\OCR-Test-One\OCR-Test-One’ for ‘libtesseract304.dll’ on platform x86. Tesseract Information: 0 : Trying to load native library “C:\Projects\SANDBOX\OCR-Test-One\OCR-Test-One\x86\libtesseract304.dll”… Tesseract Information: 0 : Successfully loaded native library “C:\Projects\SANDBOX\OCR-Test-One\OCR-Test-One\x86\libtesseract304.dll”, handle = 329383936. Tesseract Information: 0 : Trying to load native function “TessBaseAPIAnalyseLayout” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIAnalyseLayout”, function handle = 329706928. Tesseract Information: 0 : Trying to load native function “TessBaseAPIClear” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIClear”, function handle = 329706560. Tesseract Information: 0 : Trying to load native function “TessBaseAPICreate” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPICreate”, function handle = 329709952. Tesseract Information: 0 : Trying to load native function “TessBaseAPIDelete” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIDelete”, function handle = 329709920. Tesseract Information: 0 : Trying to load native function “TessBaseAPIDetectOS” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIDetectOS”, function handle = 329706368. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetBoolVariable” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetBoolVariable”, function handle = 329709264. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetDoubleVariable” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetDoubleVariable”, function handle = 329709184. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetHOCRText” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetHOCRText”, function handle = 329706736. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetIntVariable” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetIntVariable”, function handle = 329709344. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetIterator” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetIterator”, function handle = 329706784. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetPageSegMode” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetPageSegMode”, function handle = 329707728. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetStringVariable” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetStringVariable”, function handle = 329709104. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetThresholdedImage” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetThresholdedImage”, function handle = 329707312. Tesseract Information: 0 : Trying to load native function “TessBaseAPIGetUTF8Text” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIGetUTF8Text”, function handle = 329706752. Tesseract Information: 0 : Trying to load native function “TessBaseAPIInit4” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIInit4”, function handle = 329708688. Tesseract Information: 0 : Trying to load native function “TessBaseAPIMeanTextConf” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIMeanTextConf”, function handle = 329706688. Tesseract Information: 0 : Trying to load native function “TessBaseAPIRecognize” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPIRecognize”, function handle = 329706912. Tesseract Information: 0 : Trying to load native function “TessBaseAPISetDebugVariable” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPISetDebugVariable”, function handle = 329709424. Tesseract Information: 0 : Trying to load native function “TessBaseAPISetImage2” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPISetImage2”, function handle = 329707536. Tesseract Information: 0 : Trying to load native function “TessBaseAPISetInputName” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPISetInputName”, function handle = 329709840. Tesseract Information: 0 : Trying to load native function “TessBaseAPISetPageSegMode” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPISetPageSegMode”, function handle = 329707760. Tesseract Information: 0 : Trying to load native function “TessBaseAPISetRectangle” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPISetRectangle”, function handle = 329707440. Tesseract Information: 0 : Trying to load native function “TessBaseAPISetVariable” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessBaseAPISetVariable”, function handle = 329709504. Tesseract Information: 0 : Trying to load native function “TessDeleteBlockList” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessDeleteBlockList”, function handle = 329710688. Tesseract Information: 0 : Trying to load native function “TessDeleteIntArray” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessDeleteIntArray”, function handle = 329710720. Tesseract Information: 0 : Trying to load native function “TessDeleteText” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessDeleteText”, function handle = 329710784. Tesseract Information: 0 : Trying to load native function “TessDeleteTextArray” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessDeleteTextArray”, function handle = 329710736. Tesseract Information: 0 : Trying to load native function “TessVersion” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessVersion”, function handle = 329710800. Tesseract Information: 0 : Trying to load native function “TessPageIteratorBaseline” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorBaseline”, function handle = 329705472. Tesseract Information: 0 : Trying to load native function “TessPageIteratorBegin” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorBegin”, function handle = 329705760. Tesseract Information: 0 : Trying to load native function “TessPageIteratorBlockType” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorBlockType”, function handle = 329705568. Tesseract Information: 0 : Trying to load native function “TessPageIteratorBoundingBox” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorBoundingBox”, function handle = 329705616. Tesseract Information: 0 : Trying to load native function “TessPageIteratorCopy” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorCopy”, function handle = 329705776. Tesseract Information: 0 : Trying to load native function “TessPageIteratorDelete” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorDelete”, function handle = 329705808. Tesseract Information: 0 : Trying to load native function “TessPageIteratorGetBinaryImage” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorGetBinaryImage”, function handle = 329705552. Tesseract Information: 0 : Trying to load native function “TessPageIteratorGetImage” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorGetImage”, function handle = 329705520. Tesseract Information: 0 : Trying to load native function “TessPageIteratorIsAtBeginningOf” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorIsAtBeginningOf”, function handle = 329705696. Tesseract Information: 0 : Trying to load native function “TessPageIteratorIsAtFinalElement” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorIsAtFinalElement”, function handle = 329705664. Tesseract Information: 0 : Trying to load native function “TessPageIteratorNext” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorNext”, function handle = 329705728. Tesseract Information: 0 : Trying to load native function “TessPageIteratorOrientation” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessPageIteratorOrientation”, function handle = 329705440. Tesseract Information: 0 : Trying to load native function “TessResultIteratorCopy” from the library with handle 329383936… Tesseract Information: 0 : Successfully loaded native function “TessResultIteratorCopy”, function handle = 329705200. Tesseract Information: 0 : Trying to load native function “TessResultIteratorDelete” from the library with handle 329383936…

– Again the log is from one run (one attempt to execute the single line of code listed at the start of this post). Conclusion

I am a very experienced programmer (have done win32 to cloud). I spent about 5 hours trying to get this to work without success. One thing I notice is that the log seems to end on TessResultIteratorDelete, and in some cases it starts to print the next line but stops midway (prints “Tesseract Information: 0 : Successfully”, or “Tesseract Information: 0 : S”).

Any help that you can offer would be greatly appreciated (the more specific the better).

Thank you very much again.

Best, Conrad

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/charlesw/tesseract/issues/318, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPzyPb7KW6g6m7pE5HhORKHByTo19EIks5rdTZ4gaJpZM4MD5r6 .

0reactions
andimalajcommented, Sep 23, 2021

Fail with asp.net core, i’ve tried exactly path, but still throw exception failed to initalise… Please help me image image

Try using tessdata_fast rather then tessdata version. Anyone knows how to read data from table in image with this library?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to initialise tesseract engine. Can't find correct version
First, make sure the DLLs inside the x64 and x86 folders are set to "Copy Always" (or Copy if newer). These DLLs are...
Read more >
Failed to initialise tesseract engine [Please help ...]
I have installed Visual C++ Redistributable for Visual Studio 2015 on my x86 laptop. I use visual studio 2013 to develop a form...
Read more >
[Simple OCR] How to fix error on Simple OCR "Could not ...
Note: In my personal environment it works perfectly, but in another environment I get this error message: "Could not initialize tesseract.
Read more >
tesseract
TesseractException : Failed to initialise tesseract engine. ... My Visual Studio 2015 project downloaded Tesseract 4.1.1 from NuGet, runs fine on Windows 7,...
Read more >
Tesseract 5.2.0
Tesseract 5 adds a new neural net (LSTM) based OCR engine which is focused on line ... Tesseract OCR engine of Tesseract 3...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found