← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #150217]: getBundlePath returns None when running unit tests from the command line

 

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

    Status: Answered => Open

Matthew Balvanz is still having a problem:
Using the self.path option seems to cause an error that prevents the
script from running:

[info] Sikuli vision engine loaded.
[info] Windows utilities loaded.
[info] VDictProxy loaded.
[error] null

The IDE shows this error:

Exception in thread "MainThread" Traceback (most recent call last):  
File " ", line 6, in   
File " ", line 14, in unitTests 
NameError: name 'self' is not defined 

Not declaring self before you start declaring functions for unit tests
seems to work fine.  For instance:

mystring = "My String"
def testIt(self):
	print self.mystring

Prints the value of mystring in the IDE and command line.

Something I noticed today is that I get the same behavior in the IDE if
I have not previously run any standard scripts using the Run button or
the Run drop down.  So it appears that it may be related to running the
script as unit tests instead of running as a standard sikuli script.

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