Skip to content

Error 1

Charles Weld edited this page Jul 26, 2015 · 6 revisions

This error occurs should the tesseract engine fail during initialization.

Common reasons are:

  • Tesseract 3.02 will ignore the specified language data path if the TESSDATA_PREFIX environment variable is defined, and use this value instead (See Issue 103).
  • The language data was build for a different version of tesseract. For example you should not use the language data built for 3.04 with Tesseract 3.02.
  • The language data doesn't reside in a folder that named tessdata (see Issue #148).
  • The language data path does not exist or doesn't hold language data files for the requested language.
  • The language data path ends in a / or \ character.
  • The language data does exist but was built for a different version of tesseract or is otherwise corrupt.

Further diagnosis

While Tesseract (native) only returns a success / fail response, it does however write out a lot more information about why the operation failed to the standard output which can be used to diagnose the error. The .net wrapper also outputs some information to the Tesseract trace source which may be helpful. An example configuration has been provided below.

If you still cannot resolve the issue please file an issue including what the language, data path, and engine mode parameters are and all the text written to the standard output.

Example System.Diagnostics configuration

Add this to your web.config or app.config and adjust as required.

<system.diagnostics>
	<sources>
		<source name="Tesseract" switchValue="Verbose">
			<listeners>
				<clear />
				<add name="console" />
				<!-- Uncomment to log to file
				<add name="file" />
				-->
			</listeners>
		</source>
	</sources>
	<sharedListeners>
		<add name="console" type="System.Diagnostics.ConsoleTraceListener" />

		<!-- Uncomment to log to file
		<add name="file"
		   type="System.Diagnostics.TextWriterTraceListener"
		   initializeData="c:\log\tesseract.log" />
		-->
	</sharedListeners>
</system.diagnostics>
Clone this wiki locally
You can’t perform that action at this time.