← Back to team overview

sikuli-driver team mailing list archive

[Question #232542]: [error] NameError ( global name 'find' is not defined )

 

New question #232542 on Sikuli:
https://answers.launchpad.net/sikuli/+question/232542

Hi, need help with this error, tried everything in the documentation and in the forum, 

basically I am importing from another .py script into my main script. Everytime I run the main script from the sikuli IDE, I get the error, 

[error] NameError ( global name 'find' is not defined )

Please find my script below,

# main sikuli script

from sikuli import *

myScriptPath = "D:\\Sikuli\\TestProjects\\PCBAuto.sikuli"

if not myScriptPath in sys.path: sys.path.append(myScriptPath)

import PCBAutoFns
reload(PCBAutoFns)

from PCBAutoFns import *

PCBAutoFns.play()


# PCBAutoFns.py -- imported script

import sys

from sikuli import *

# Press the [play] button
def play():
  bttns_tab = find("1373571033937.png")
  click(bttns_tab)


-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.