leading slash in path in front of drive letter - java crash

Asked by Lejma

Hello,

i experienced interesting issue today... i upgraded from old sikuli to new 1.1.0 and set it up together with java 8.77 on one machine, everything went well, and its working.. in module i was executing first, i have this code:

from sikuli import *
import os
import traceback
print "bundle path:" + getBundlePath()

correct module path is printed out, which is C:/SIKULI

on other machine, which should be the same, meaning same OS (win 7 64b), sikuli and java, when i run sikuli launching this module i get this printed out instead: /C:/SIKULI
notice the leading slash

few lines below when im importing another module when sikuli uses path above which im adding to paths (the /C:/SIKULI one) it causes a java exception together with NameError While Importing module probably at the point of using that invalid path with leading slash, so i guess it doesnt like the slash there...

Exception in thread "MainThread" java.lang.IllegalStateException: No match found
        at java.util.regex.Matcher.group(Unknown Source)
        at org.sikuli.scriptrunner.JythonScriptRunner.findErrorSourceWalkTrace(JythonScriptRunner.java:356)
        at org.sikuli.scriptrunner.JythonScriptRunner.findErrorSource(JythonScriptRunner.java:321)
        at org.sikuli.scriptrunner.JythonScriptRunner.runPython(JythonScriptRunner.java:226)
        at org.sikuli.scriptrunner.JythonScriptRunner.runScript(JythonScriptRunner.java:183)
        at org.sikuli.scriptrunner.ScriptingSupport$RunBox.run(ScriptingSupport.java:597)
        at org.sikuli.scriptrunner.ScriptingSupport$RunBox.access$400(ScriptingSupport.java:513)
        at org.sikuli.scriptrunner.ScriptingSupport.runscript(ScriptingSupport.java:442)
        at org.sikuli.ide.SikuliIDE.run(SikuliIDE.java:198)
        at org.sikuli.ide.Sikulix.main(Sikulix.java:21)

my question is then, how that could happen? what is the problem here on the second machine?

thank you for any help!

Question information

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

neither of the versions you use is the official final 1.1.0

I just made a test to be sure:
getBundlePath correctly prints on Windows: C:\Folder\Folder\some.sikuli

there was a problem in pre-final versions of 1.1.0 with a mix of backslash and forward slashes (Java internal use).

So please check again:
http://sikulix.com

Revision history for this message
Lejma (dan-svoboda) said :
#2

thanks for superquick answer!

im a bit confused from your answer, im using sikuli which i downloaded just today from sikulix.com on both machines, so i asume it is the latest, with latest java, on one machine getBundlePath prints correctly, on other it does not, it adds leading forward slash at the beginning for some reason, literally printing out "/C:/mybundlepath"

i remember the i encountered the issue with backslash/slash mix, but this one seems a different case

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

... but something must be odd:
it should not print:
C:/SIKULI

but
C:\SIKULI

could you send me the setup log files from both machines?
sikulix--at--outlook--dot--com

Can you help with this problem?

Provide an answer of your own, or ask Lejma for more information if necessary.

To post a message you must log in.