Comment 3 for bug 845744

Revision history for this message
Ryan Paterson (ryan-paterson) wrote : Re: SCREEN.capture is broken (__builtin__ is not defined)

I hit a similar error in the latest Sikuli version. It appears that "import __builtin__" exists in sikuli-script.jar/Lib/sikuli/Screen.py but is commented out. Un-commenting the import statement appears to fix it.

Sikuli Version: Sikuli IDE 1.0.0 Win64
OS: Windows 7 x64
Java: Java 6 x86 JRE
Script Name: template

Code:
Line 4: screen1 = Screen(0)
Line 5: bounds = screen1.getBounds()
Line 6: screenShot = screen1.capture(bounds)

Complete Error Message:
Exception in thread "Thread-8" java.lang.IllegalStateException: No match found
 at java.util.regex.Matcher.group(Unknown Source)
 at org.sikuli.ide.SikuliIDE$ButtonRun.findErrorSourceWalkTrace(Unknown Source)
 at org.sikuli.ide.SikuliIDE$ButtonRun.findErrorSource(Unknown Source)
 at org.sikuli.ide.SikuliIDE$ButtonRun.access$1500(Unknown Source)
 at org.sikuli.ide.SikuliIDE$ButtonRun$1.run(Unknown Source)

[error] script [ template ] stopped with error in line 6
[error] NameError ( global name '__builtin__' is not defined )