← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #256439]: How can I see in IDE the exact line of error inside Class

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
You seem to run a previous version of Sikuli.

With the latest 1.1.0 build (http://sikulix.com), I get this:

# testErrorLineMain.sikuli
import testErrorLineSub as sub
reload(sub)
objMyClass = sub.MyClass()
#objMyClass.funktion()
objMyClass.findError("1414743233981.png")

# testErrorLineSub.sikuli
from sikuli import *
class MyClass:
  def funktion(self):
    print MyClass.val
  def findError(self, image):
    find(image)

... for the failing function()
[error] script [ testErrorLineMain ] stopped with error in line 4
[error] AttributeError ( class MyClass has no attribute 'val' )
[error] --- Traceback --- error source first
line: module ( function ) statement 
4: testErrorLineSub ( funktion ) print MyClass.val
[error] --- Traceback --- end --------------

... and for the FindFailed
[error] script [ testErrorLineMain ] stopped with error in line 5
[error] FindFailed ( can not find 1414743233981.png in R[0,0 1440x900]@S(0) )
[error] --- Traceback --- error source first
line: module ( function ) statement 
6: testErrorLineSub ( findError ) find(image)
[error] --- Traceback --- end --------------

Should be sufficient ;-)

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