Region: doFind: Image not loadable: wechat_icon.png

Asked by kiyo

I can not run my sikuli project and the log was following :
[error] ImagePath: add: class images not found on classpath.
[error] ImagePath: add: not valid: images
[error] Image: could not be loaded: file:/F:/test/Wechat_automation/hs/Wechat/Wechat.sikuli/wechat_icon.png
[error] Image: Image not valid, but TextSearch is switched off!
[error] script [ Wechat ] stopped with error in line 40
[error] FindFailed ( Region: doFind: Image not loadable: wechat_icon.png )
[error] --- Traceback --- error source first line: module ( function ) statement 13: main ( startwechat ) click("wechat_icon.png")
36: main ( runTest ) self.startwechat()
[error] --- Traceback --- end --------------

I put wechat_icon.png into image folder,and image folder was under sikuli project folder.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

not a bug, but a usage problem

Revision history for this message
RaiMan (raimund-hocke) said :
#2

I understand, that you have

-- F:/test/Wechat_automation/hs/Wechat/Wechat.sikuli
    -- folder images
        wechat_icon.png

You seem to use addImagePath("images")

... but you have to give an absolute path

addImagePath(os.path.join(getBundlePath(), "images"))

Can you help with this problem?

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

To post a message you must log in.