Exception in thread "Thread-45" (SX 2.05 on Java 8)

Asked by Mike Praeuner on 2021-04-23

#My Script *(simple)
myScriptPath = "D:\\MikE\\Sikuli Scripts"
addImportPath(myScriptPath)
import ldFunc
#from ldFunc import * #v1.1.4 syntax
ldFunc.hunt()
#hunt()

---
sample of ldFunc
----
from sikuli import *
#(then a bunch of functions that are re-used between scripts)
#function hunt
def hunt():
 for _ in range(5): #repeat function x times
  if not exists("1619192157098.png", 3):
   try:
       hover("1619192180052.png")
   except FindFailed:
       pass
   if exists("1619192200722.png"):
       print "scrolled to bottom - fail hunt"
       home()
       break
   else:
       wheel(WHEEL_DOWN, 1) # Scrolls down x times
  else:
   print "scrolled to hunt"
   if exists("1619192157098.png"):
    click("1619192157098.png")
    sleep(2)
   else:
    sleep(0)
   if exists("1619192244446.png"):
    click("1619192244446.png")
    print "---found Hunt"
    clearPopsi()
    if exists("1619192266597.png", 3):
     click("1619192266597.png")
    else:
     sleep(0)
    clearPopsi()
   else:
    print "hunt not ready"
   home()
   break
----

-Error-
Exception in thread "Thread-45" Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Eris\AppData\Roaming\Sikulix\Lib\sikuli\__init__.py", line 4, in <module>
    from Sikuli import *
  File "C:\Users\Eris\AppData\Roaming\Sikulix\Lib\sikuli\Sikuli.py", line 94, in <module>
    OEM_TESSERACT_ONLY = TextOCR.OcrEngineMode.TESSERACT_ONLY
AttributeError: type object 'TextOCR' has no attribute 'OcrEngineMode'

Question information

Language:
English Edit question
Status:
Open
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Mike Praeuner (eris667) said : #1

I may have made a boneheaded mistake somewhere, been a few years since I upgraded / re-worked my scripts

Troubleshooting now (between my dev machine and production machine)

Can you help with this problem?

Provide an answer of your own, or ask Mike Praeuner for more information if necessary.

To post a message you must log in.