UnicodeDecodeError when attempting the most basic command in the Sikuli IDE 1.0rc3

Asked by Benny Phanichkul

Hi,

I've set up a Win7 32 bit with Sikuli and Jenkins and have successfully been running scripts on it using Robot Framework + Jenkins. However, I recently discovered an issue where an exist assertion would fail if I wasn't using remote desktop to connect to the remote PC. The same exist assertion would work if I was remotely logged into the same box. Baffled, I decided to try to manually run some tests on that box with the Sikuli IDE to see if it could do the exist assertion using the same source image. However, whenever I try to do anything in the IDE, I get this error.

[error] Stopped
[error] Error message: UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 8-10: truncated \xXX

I can't even make a single print statement. Any idea what I can do to resolve this issue? I am using Sikuli 1.0RC3/Win732-bit

Again, Sikuli is correctly installed on this machine as I am able to run scripts on it remotely via commandline.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Benny Phanichkul (benny-w) said :
#1

i found this bug that might be the culprit.
https://bugs.launchpad.net/sikuli/+bug/912477

my user name on this computer is xpdev so my paths are c:\user\xpdev\ so the \x part might be messing up sikuli.

any workarounds to this?

Revision history for this message
Roman Podolyan (podolyan-roman) said :
#2

I had similar issue/error trying to run Sikuli scripts with the Robot Framework. I couldn't determine what was wrong, but overcomed it opening file throwing this error with notepad-like editor (Akelpad) and saving it back as plain ASCII text.

Revision history for this message
dawn (dawnyan520) said :
#3

Have the same problem.

And the paths are D:\Program Files (x86)\Sikuli X

Revision history for this message
RaiMan (raimund-hocke) said :
#4

@ Dawn
The "workaround" of the mentioned bug says:

Do NOT put your scripts in a folder, whose absolute path contains a \x

On top it is generally not recommended to put any user data (like Sikuli scripts) in a program folder. Use a folder in a normal user data directory and do not store Sikuli scripts at the root position of a drive.

Revision history for this message
RaiMan (raimund-hocke) said :
#5

connected to a bug

Revision history for this message
dawn (dawnyan520) said :
#6

Thanks, no this error any more.
But new error is coming:(

[info] VDictProxy loaded.

[error] Stopped
[error] An error occurs at line 1
[error] Error message: SyntaxError: ('mismatched character \'\\n\' expecting \'"\'', ('', 1, 17, 'addModPath("D:\\")\n'))

And I made some changes based on https://bugs.launchpad.net/sikuli/+bug/944687, it's still reporting error...

Revision history for this message
RaiMan (raimund-hocke) said :
#7

Scripts should not be in the root of a volume, at least one folder level (this is a bug).

so instead of
D:\myScript.sikuli

use
D:\myScripts\myScript.sikuli