SikuliLibrary.GetText throws exception when used on Linux

20 views
Skip to first unread message

Gerhard Heil

unread,
Sep 25, 2025, 8:29:26 AM (2 days ago) Sep 25
to robotframework-users
SikuliLibrary.Get Text throws an exception when it is used on a Linux Mint system:
org.sikuli.script.SikuliXception: OCR: start: Tesseract library problems: Error looking up function 'TessBaseAPIInitLangMod': /usr/lib/x86_64-linux-gnu/libtesseract.so.5.0.3: undefined symbol: TessBaseAPIInitLangMod

I have called Set Ocr Text Read | true before. Other SikuliLibrary keywords run errorfree on Linux, and the same script runs errorfree on a Windows system. 

I found that to use Sikuli OCR on Linux, I need opencv and tesseract, besides installing Sikuli on the system; I have done that. Maybe there is a version conflict between Sikuli, opencv and tesseract that I have installed and the versions that are included in SikuliLibrary. 

Hélio Guilherme

unread,
Sep 25, 2025, 9:32:53 AM (2 days ago) Sep 25
to robotframework-users
I suspect you need to install the Tesseract language files: tesseract-lang-eng 
See the SikuliX site.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/robotframework-users/8db6a485-99bf-4424-90ea-f0f2db65be03n%40googlegroups.com.

Hélio Guilherme

unread,
Sep 25, 2025, 11:04:04 AM (2 days ago) Sep 25
to robotframework-users
Correction 
You should install tesseract-langpack-eng
I am preparing a Docker image based on Fedora 42 and I have this installation command:
dnf install -y tesseract tesseract-tessdata-doc tesseract-langpack-eng tesseract-langpack-por  # this is my own language

Gerhard Heil

unread,
Sep 26, 2025, 11:33:18 AM (20 hours ago) Sep 26
to robotframework-users
Thanks; obviously I am one step further.

Tesseract-langpack-* or tesseract-lang-* are not found, instead I found and installed tesseract-ocr-eng and ...-deu. Now the exception is:
org.sikuli.script.SikuliXception: OCR: start: Tesseract library problems: Error looking up function 'TessBaseAPIRecognizeForChopTest': /usr/lib/x86_64-linux-gnu/libtesseract.so.5.0.3: undefined symbol: TessBaseAPIRecognizeForChopTest

Hélio Guilherme

unread,
Sep 26, 2025, 12:26:13 PM (20 hours ago) Sep 26
to robotframework-users
Well, I see this document for the API, mentioning: A Java wrapper for Tesseract OCR 3.02 API using JNA Interface Mapping
The docs show the class until Tess4J 4.4:  A Java wrapper for Tesseract OCR 4.1.0 API using JNA Interface Mapping.
SikuliX mentions, in the 2.0.5 fixes: CHANGED: Tess4J now version 4.5.4 (Tesseract still 4.1.x) reason: issue #412 
Starting from Tess4J 5.0 the class is absent.
I found a newer version for the TessAPI, 5.4.1, here. The class TessBaseAPIRecognizeForChopTest does not exist in this version.

Latest version for Tesseract is 5.5.1, and on Fedora 42 we are using 5.5.0.

So, my opinion is that you are using an old library for SikuliLibrary, Could you try a VirtualBox/VMWare machine with a fresh install of the Robot Framework ecosystem and SikuliLibrary?


Reply all
Reply to author
Forward
0 new messages