IDE crashes when I run OCR

Asked by Waikit Lau

I'm trying to do number extraction from a webpage using Tessaract/OCR.

I have installed Tesseract v4.1.1. on my MacOS machine (running 10.13.6 High Sierra).

When I run just this test code snippet, the Sikuli IDE crashes. The crash repost says "Termination Reason: DYLD, [0x4] Symbol missing"

import sys
priceRegion = Region(79,192,80,32)
price = priceRegion.text()

What am I doing wrong?

Question information

English Edit question
SikuliX Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :

running macOS 11.4 using Java 11 and IDE 2.0.5 from a Terminal via java command.

I have Tesseract 4.1.1 installed via homebrew.

tesseract --version says:
tesseract 4.1.1
  libgif 5.2.1 : libjpeg 9d : libpng 1.6.37 : libtiff 4.1.0 : zlib 1.2.11 : libwebp 1.1.0 : libopenjp2 2.3.1
 Found AVX2
 Found AVX
 Found FMA
 Found SSE

and a test as
print selectRegion().text()

simply does what it should do.

So check your setup and run from terminal with parameters -v -c

Revision history for this message
Waikit Lau (waikitlau) said :

When I ran your test from terminal, it still crashes after the IDE loads and have the same crash report "Termination Reason: DYLD, [0x4] Symbol missing"

This was the command I ran - "java -jar "/Users/waikit/Downloads/sikulixide-2.0.5.jar" -r -v -c "/Users/waikit/Dropbox/TestOCR.sikuli"

I'm running macOS 10.13.6 using Java 16 and IDE 2.0.5

I have Tesseract 4.1.1 and when I run --version, it says:
tesseract 4.1.1
  libgif 5.2.1 : libjpeg 9d : libpng 1.6.37 : libtiff 4.3.0 : zlib 1.2.11 : libwebp 1.2.0 : libopenjp2 2.4.0
 Found AVX2
 Found AVX
 Found FMA
 Found SSE

Revision history for this message
RaiMan (raimund-hocke) said :

please run
java -jar "/Users/waikit/Downloads/sikulixide-2.0.5.jar" -v -c

then in the IDE run a script like so:


... select some area

... and send the complete output you get in the terminal to my mail sikulix---at---outlook---dot---com

Revision history for this message
RaiMan (raimund-hocke) said :

again tested:

- tesseract installed via homebrew
- this creates a symlink for libtesseract.dylib in /usr/local/lib

... and everything works

so check, wether there is an entry (real or symlink) for libtesseract.dylib in /usr/local/lib

Can you help with this problem?

Provide an answer of your own, or ask Waikit Lau for more information if necessary.

To post a message you must log in.