← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #677916]: Script Exception after region highlight

 

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

Description changed to:
Hello all,
With the script below (a part of a much longer script), after "vncReg.highlight(2)" I have this error:
[error] Error caused by: Traceback (most recent call last): File "c:\TEstBug.sikuli\TEstBug.py", line 4, in <module> vncReg.highlight(2) AttributeError: 'org.sikuli.script.Region' object has no attribute '__exit__' 

That I had not with older versions of Sikulix.
This happens with running inside the IDE and from Pycharm, no differences in error messages
How could I fix this error?
My environment is :
1.1.4-SNAPSHOT-2019-01-16_07:30/Windows10.0/Java8(64)1.8.0_191-b12
Thanks in advance

This is the minimum script to show the error, the images are the connection button and the refresh button of the ultravnc window, line 4 mentioned in the error message is "vncReg.highlight(2)"
appVNC= App(r'"c:\UltraVNC\vncviewer.exe"')
appVNC.open(0)
vncReg=appVNC.focusedWindow()
vncReg.highlight(2)
with vncReg:
    click("1544788207679.png")


and this is the full console output:
[log] highlight R[773,299 374x401]@S(0) for 2.0 secs

[error] script [ TEstBug ] stopped with error at line --unknown--
[error] Error caused by: Traceback (most recent call last): File "C:\Projects\DataPurchase\REACT\SikuliX\Test_h20\TEstBug.sikuli\TEstBug.py", line 4, in <module> vncReg.highlight(2) AttributeError: 'org.sikuli.script.Region' object has no attribute '__exit__' 

1.1.4-SNAPSHOT-2018-12-31_16:24/Windows10.0/Java8(64)1.8.0_191-b12

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.