← Back to team overview

sikuli-driver team mailing list archive

[Question #244760]: [error] --- Traceback --- end --------------

 

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

Hi, 

I 'm having some problems in my script... 

I don't have any idea whats happening that a traceback is happening 

....Thats the part of my script....


(LINE 1 TO 6)
def printScreen(filename):
    try:
        import shutil
        shutil.move(capture(SCREEN),filename)
    except:
        raise exception


HERE, i'm having problem

testOk = 0;
testNok = 0;

try:

    openTrackingItem()
    print("Test 1 - Passed")
    filename = "Test01Passed.png"
    printScreen(filename)
    testOk = testOk +1;

except:
    
    print("Test 1 - Failed")
    filename = "Test01Failed.png"
    printScreen(filename)   <--------
    testOk = testNok +1;


[error] script [ *Sanity_ePM ] stopped with error in line 60
[error] NameError ( global name 'exception' is not defined )
[error] --- Traceback --- error source first line: module ( function ) statement 6: main ( printScreen ) raise exception
[error] --- Traceback --- end --------------



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