Customized guide function

Asked by Calvin

Hi, i tried to create a cuztomized guide function but it would not work. The image variable seems to be the problem.

Here's my code:

def showIntro(image,sec):
    image(Region(0,0,1280,720), image, side ="over")
    show(sec)

It gives me an error log when i try to use it.

 File "XXXXXX\sikuli-tmp4673222027611219019.py", line 36, in showIntro
 image(Region(0,0,1280,720),image, side ="over")
TypeError: 'str' object is not callable

Question information

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

Python basics ;-)

the parameter image locally overrides the guide method image()

def showIntro(img, sec):
    image(Region(0,0,1280,720), img, side ="over")
    show(sec)

Revision history for this message
Calvin (calvin-v99) said :
#2

Thanks RaiMan, that solved my question.