[1.1.4] Windows 10: OCR TessAPI: crashes with library unsatisfied link error

Asked by John DB on 2019-04-09

Hello,

I have a script I've devloped on macOS, which works great.

I have since tried to port the script to Windows 10. I downloaded the 1.1.4 SikuliX jar as well as jython on that system.

Everything seemed to work until the script ran into .text(). There, it would throw the following error:

at com.sun.jna.Native.open(Native Method)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:288)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:427)
at com.sun.jna.Native.register(Native.java:1647)
at com.sun.jna.Native.register(Native.java:1360)
at net.sourceforge.tess4j.TessAPI1.<clinit>(TessAPI1.java:41)
at org.sikuli.script.TextRecognizer.start(TextRecognizer.java:92)
at org.sikuli.script.TextRecognizer.doOCR(TextRecognizer.java:243)
at org.sikuli.script.TextRecognizer.doOCR(TextRecognizer.java:238)
at org.sikuli.script.Region.text(Region.java:4976)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.

DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: unable to load library.

As far as I can tell, tess4j doesn't seem to be properly installed.

So far, I've tried the following:

1. Installing a few different versions of the JRE (now on 8u202).
2. Installing Tesseract.
3. Downloading tess4j and adding the contents of "tessdata" to the appropriate AppData directory.

Not exactly sure what to do next.. any help would be greatly appreciated!

I also would like to take the opportunity to thank you for the continued development of such a useful piece of software!

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2019-04-10
Last query:
2019-04-10
Last reply:
2019-04-10
RaiMan (raimund-hocke) said : #1

do you have a Windows 10 n or KN version?
see bug 1823477

RaiMan (raimund-hocke) said : #2

With my Windows 10 it works as expected.

John DB (jdbash) said : #3

It's a regular Windows 10 Home (build 1803). It is a European version, but other than that, the media components should be in..

John DB (jdbash) said : #5

That worked, thank you so much RaiMan!