← Back to team overview

sikuli-driver team mailing list archive

[Question #192635]: Funny Issue with Indentation

 

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

Hi all, 

Today will be my worst day working on Sikuli. For some reasons, the simple codes below keeping complaining the error :

[error]Stopped
[error]Error message: IndentitationError:('unindent does not match any outer indentation level',...........py',15,12,'sleep(1)\n


Below are my codes :

CountryFile    = open('c:\\temp\\test1.txt')
SourceFile     = open('c:\\temp\\test2.txt')


while 1:
    NewCtyCode = CountryFile.readline()
    if not NewCtyCode:
        break
    
    while 2:
        DetailLine = SourceFile.readline()

        if not DetailLine:
            break
        if exists("3Cratrule.png"):click("3Cratrule.png")
        if exists("1333424884373.png"):  <------- if i remove this line and below, everything is fine.
            sleep(1)  
					

If i change the last 2 lines to :
        if exists("1333424884373.png"): sleep(1)  <--- this give me "mismatched input" expecting DEDENT


I had double check all the syntax and indentation, but it seems very fine to me.

Any advise ?

Thanks in advance.

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