← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #704189]: NameError: name 'use' is not defined

 

Question #704189 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/704189

    Status: Open => Answered

RaiMan proposed the following answer:
--- your code
from sikuli import *
import Ryancode
print("ryan")
tmpRegion = <screenshot of desktop with highlighted region for test purposes>
tmpRegion.highlight(2)

syntactically correct would be:
find(tmpRegion).highlight(2)
... but if this makes sense in this situation - I do not know ;-)

If tmpRegion really is a screenshot image, then 
tmpRegion.highlight(2)

would report an error, that highlight is not defined for a string
object.

hence your error happens earlier and the only reasonable place is
Ryancode, since the module sikuli does not produce such an error (just
check with a one-liner script).

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