sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #55956
[Question #693376]: OCR is working when running from bash but not from IDE
New question #693376 on Sikuli:
https://answers.launchpad.net/sikuli/+question/693376
2.0.4-2020-03-14_08:01/Mac10.14.6/Java8(64)1.8.0_261-b12
I have many scripts using the OCR functions that were running fine a couple months ago. When I now came back to using Sikuli again I have found that the scripts run fine when running from the command line or bash scripts, but fail when running from the IDE with a message like:
[error] script [ _text_test1 ] stopped with error in line 7
[error] java.lang.NoClassDefFoundError ( java.lang.NoClassDefFoundError: Could not initialize class et.sourceforge.tess4j.Tesseract1 )
[error] --- Traceback --- error source first
line: module ( function ) statement
7: main ( <module> ) t = reg.text()
[error] --- Traceback --- end --------------
This is a simple test script that generates the error when looking for the text on the Google Search button on the google home page:
Settings.OcrTextRead = True
Settings.OcrTextSearch = True
reg = Region(576,479,136,46)
reg.highlight(1)
print(reg)
t = reg.text()
print(t)
I have reinstalled both Sikulix and tesseract
Here is my java and tesseract info:
Kozs-MacBook-Air:tC_Test_Scripts cckozie$ java -version
java version "1.8.0_73"
Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)
Kozs-MacBook-Air:tC_Test_Scripts cckozie$ tesseract -v
tesseract 4.1.1
leptonica-1.80.0
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
Do you have any suggestions on what might be causing this problem and how I might fix it?
Thanks!
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.