setBundlePath when using Eclipse?

Asked by Harry Readinger

I have been working on setting up eclipse to be my main Sikuli IDE, I followed the steps outlined in the documentation http://sikuli.org/docx/faq/040-other-ide.html

Here is the script I am running:

from sikuli.Sikuli import *

setBundlePath("C:\path\to\script.sikuli")

def setup():
    menus = find("EIMZSROFLC0p.png")
    menu = Region(menus)
    menu.click("SearchTab.png")

def search():
    searchArea = find("SearchBoxes.png")
    searches = Region(searchArea)
    searches.click("1316620375617.png")
    wait(0.5)
    searches.click("AccountNumberText.png")
    searches.type("377079\n")
    wait(1)
    if not exists("Dotbleddrana.png"):
        raise Exception("Can't find the results of the search")

def openTicket():
    results = find("Dubleddmacco.png")
    r = Region(results)
    r.click("Createanewti.png")
    r.doubleClick(Pattern("testTidet.png").targetOffset(-87,0))
    ctw = find("CreateTicket.png")
    ctr = Region(ctw)
    ctr.click("Source.png")
    ctr.click("he40.png")
    ctr.click("Ok-1.png")
    wait(Pattern("ticketDetailWindow.png").similar(0.60), 200)

def addNote():
    tw = find("Detailsf0rTk.png")
    tr = Region(tw)
    tr.type("lrrlAddtAppe.png", "This is a CSR note")
    tr.click("lrrlAddtAppe-1.png")
    tr.click("RefreshCsrNo.png")
    if not tr.exists(Pattern("msssacsRne.png").similar(0.87)):
        tr.type("APAPResolveE.png", "this is resolution text")
        tr.click("Resolve.png")
        raise Exception("Did not add CSR note or cannot find it")
    elif tr.exists(Pattern("msssacsRne.png").similar(0.87)):
        tr.type("APAPResolveE.png", "this is resolution text")
        tr.click("Resolve.png")
    tr.click("1317406232458.png")

def reset():
    wait(1)
    cw = find("ROFLCopterQC.png")
    cr = Region(cw)
    cr.click("1317407794034.png")
    cr.click("1317407803005.png")

global events
events = []

theTests = [setup, search, openTicket, addNote, reset]
for test in theTests:
    try:
        test()
        events.append([1,test.__name__," OK"])
    except:
        error = str(sys.exc_info()[1])
        events.append([2,test.__name__,"\n\t"+error])
        print events

I am getting errors like these:
[error] EIMZSROFLC0p.png looks like a file, but can't be found on the disk. Assume it's text.
[error] SearchBoxes.png looks like a file, but can't be found on the disk. Assume it's text.

any ideas?

Question information

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

setBundlePath("C:\path\to\script.sikuli")

only to be sure:
you either have to double the backslashes or use a raw string (which I prefer):

setBundlePath(r"C:\path\to\script.sikuli")

in any case: The path should not contain any blanks or non ascii characters.

Revision history for this message
Harry Readinger (temporary22) said :
#2

Using a raw string solved the problem. thanks RaiMan