New question #644217 on Sikuli:
https://answers.launchpad.net/sikuli/+question/644217

Hello, I'm gettin the error below, I was thinking that was some character with 
accents (maybe wrong ocr) but I all the info from ocr is printed as there is no 
accent.

[error] IDE: (org.sikuli.scriptrunner.JythonScriptRunner@6fa5acfe).runScript: 
Exception: UnicodeEncodeError: 'ascii' codec can't encode characters in 
position 177-180: ordinal not in range(128)

The code section is:

    print 'CHECKPOINT8'
    pro_list=sorted(profit.items(), key = lambda t:t[1])[-npares:]
    print 'CHECKPOINT9'
    pro_selec_dict=dict(pro_list)
    print "Pros: ", pro_selec_dict

So, the script is not printing 'CHECKPOINT9' but it is printing 'CHECKPOINT8', 
so the problem is in:

pro_list=sorted(profit.items(), key = lambda t:t[1])[-npares:]

"profit" is a dict, it is printed before when running, no error.
"npares" is a variable, it is printed before when running, as I use 4, (" 
[-4:]"), the list contains 4 items.


Please, someone knows what is the problem?

Thank you!

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to