I am having issue where it is not running the module I created in Sikuli

Asked by Ali Ahmed on 2021-02-11

I am having issue where it is not running functions from my module and I created a number of functions there but they are not running when I call them in my test. This is the error I am getting:

[error] script [ CreateABookOut ] stopped with error in line 6
[error] SyntaxError ( !!WHILE IMPORTING!! no viable alternative at input '' (SchedulingModule.py, line 238) )
[error] --- Traceback --- error source first
line: module ( function ) statement
6: main ( <module> ) import SchedulingModule

and I looked at the code there I don't see any syntax error:

def copyCounterPartyBookOut():
    r=Region(589,193,746,445)
    r.highlight(1)

    x=r.find("SnkCounterpartyExpandedHeader.png").highlight(.5)
    t=x.below(51).text()
    print "CP is "+t
    return t

I ran the code and using Run selected from the module and its able to run. I just can't seem to call the function.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

A syntax error might be reported in the line following the line with the syntax error.
In the error line usually a delimiter like a bracket or a comma is missing.

Revision history for this message
Ali Ahmed (ali13xii) said :
#2

Thanks RaiMan, that solved my question.