IDE crashed when running the note.sikuli sample script

Bug #515914 reported by Bruce Li
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Released
Undecided
Unassigned

Bug Description

========================
sikuli version: 0.9.8
========================
Sikuli script
--------------
# store some notes
d = VDict()
d[] = 'monitor'
d[] = 'light'

# add a new note
img = capture()
d[img] = input()

# lookup notes
for i in (1,2):
  query = capture()
  note = d[query][0]
  popup(note)

========================
Error log has been attached.

Tags: ide 0.9.8 crash
Revision history for this message
Bruce Li (bruce-li) wrote :
Revision history for this message
Nicholas Sedlet (nicholas-sedlet) wrote :

I am also having this problem -- running Windows XP.

Revision history for this message
j4ke (jake-mailinator) wrote :

I couldn't get this script to run correctly either, I tried different things as well..

Revision history for this message
RaiMan (raimund-hocke) wrote :

query = capture()
note = d[query][0]
popup(note)

even if you only run this once, its not "good" code, because d[query] could result None (nothing found) and then [0] evaluates to an key-error (None cannot be indexed).

So at least it has to look like this:

query = capture()
note = d[query]
if note:
    popup(note[0])
else:
   popup["not found"]

On my Mac OS X 10.6 I got it running with no problems at all. May be you have to update your Java (was the problem with other bug reports and questions).

The app as such is tricky, since the user has to know what to capture ;-)

Changed in sikuli:
status: New → Fix Committed
Changed in sikuli:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.