Why no error mesages?

Asked by Linus Holmeros

[error] Stoppad
[error] Ett fel uppstod på rad 7
[error] Felmeddelande:

How can I know what´s wrong if I don´t get any explanation other than just error?

These messages is only whats showing every time.

Greatful for help =)

Question information

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

pls. paste the first 10 lines of your script here.

Revision history for this message
Linus Holmeros (linus-holmeros) said :
#2

def CheckAlertsAfter():
 # Global variables
 global AlertsBefore
 switchApp("SSC MSS 6000") # switch to MSS 6000
 click(imagePath+"PropAlerts.png") # find Alert tab
 AlertsAfter = capture(1792,113,245,320) # GÖR OM TILL ATT HITTA ALERTS-REGIONEN
 if AlertsBefore == AlertsAfter:
  print "same"
  break
 else:
  print "diff"
  break

Error point at first break

Revision history for this message
RaiMan (raimund-hocke) said :
#3

Are the 3 lines in your post

[error] Stoppad
[error] Ett fel uppstod på rad 7
[error] Felmeddelande:

really the only text? there should be something like:

[error] Abgebrochen
[error] Ein Fehler in Zeile 4
[error] Fehlermeldung:
SyntaxError: ("'break' outside loop", ('/var/folders/C9/C9+A8gl7F9GRQtCP6jc+VU+++TI/-Tmp-/sikuli-tmp2636007879302044051.py', 4, 4, ''))

because break cannot be used as you try to use it

I guess you want to leave the function at this point: use return instead of break.

Revision history for this message
Linus Holmeros (linus-holmeros) said :
#4

Yea just that text, no explanation what so ever. Is it perhaps cuz my computer language is swedish?

Revision history for this message
Tsung-Hsiang Chang (vgod) said :
#5

What's your system language? It looks like a bug in that language's translation file.
Can you switch your system language to English or others temporarily and see if it works?

Revision history for this message
Linus Holmeros (linus-holmeros) said :
#6

My system language is swedish and im running xp prof so can´t change.

Revision history for this message
Tsung-Hsiang Chang (vgod) said :
#7

Try this. Make a copy of the Sikuli-IDE.bat in the Sikuli folder, and append "-Duser.language=en_US" to %JAVA_EXE% on the last line. Run this modified bat, and you will see the English interface.

Revision history for this message
Best Tsung-Hsiang Chang (vgod) said :
#8

I've confirmed this was caused by a translation error in the Swedish language file. I just fixed it, but you need to wait for the next release (or patch the language file by yourself). In the meantime, you can switch to the English UI with the process I mentioned above.

Revision history for this message
Linus Holmeros (linus-holmeros) said :
#9

Perfect thank you!

Revision history for this message
Linus Holmeros (linus-holmeros) said :
#10

Thanks Tsung-Hsiang Chang, that solved my question.