← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #272509]: Images could not be loaded

 

Question #272509 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/272509

Bharatendu SOUMIL posted a new comment:
Hey guys, after going through the link as mentioned by RaiMan:
https://sikulix-2014.readthedocs.io/en/latest/scripting.html#image-
search-path-where-sikulix-looks-for-image-files.....I have a file
utils.py with the following function:

from sikuli import *
def openChrome():
    wait(0.5)
    click("1555071973270.png")
    type("chrome")
    wait(0.1)
    type(Key.ENTER)

Now i want to include utils.py to another file called test.py as
follows:

import sys
myScriptPath="D:\\Academic_Software\\SikuliX\\utils.sikuli"
if not myScriptPath in sys.path: sys.path.append(myScriptPath)
import utils
reload (utils)
utils.openChrome()

When i run i still get the error mentioned by  Angelica
[error] Image: Image not valid, but TextSearch is switched off!
[error] RunTimeIDE: ImageMissing: 1555071973270.png

As per the documentation  in the above mentioned link...the images are
also automatically loaded when importing a project (in this case
"utils").

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.