Sikuli failing to run script or executable when launched from command line or double clicked

Asked by kinetik

[Mac OSX 10.6.8] [Sikuli 1.0.1]

When I create a script and try to run the script or executable via command line, the Sikuli icon bounces and is highlighted in the dock, then the java applet bounces and highlights and the yellow banner flashes. At that point, both the java applet disappears and the highlight is removed from the dock icon, indicating that the app is no longer running.

I thought I might be doing something wrong but there's another seemingly related issue. When I double click the .sikuli script file, the IDE opens with that annoying dialog that says click ok or the script will run in 3 seconds. But instead of opening the script as it has in the past, it opens with an untitled document. If I try opening the script again from the file menu, the script will open and run fine.

I've checked the contents of the executable and the .py and html files are there with the correct info. Just not sure why this is no longer working. Any ideas?

Thanks!

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

I just checked all variants of running/loading scripts on my OSX 10.8 having Sikuli-IDE.app in the folder /Applications with a completely fresh setup.

Everything works fine (I am running Java 7)

You might try this
- in the folder ~/Library/Preferences
- delete all plist files starting with org.sikuli.

BTW: currently you have to live with the popups/dialogs/yellows ;-)
I will try to make this more flexible and configurable with 1.1 (betas starting soon)

Revision history for this message
kinetik (kinetik-e) said :
#2

Thanks for the response RaiMan—I just tried deleting the siluli plist files and got the same thing. I've already also tried to reinstall Sikuli and still no go. I'm on OS [10.6.8] and not [10.8], so maybe there's an issue there, but unfortunately I still can't get this to work. The script launches, gives the dialog about running the script in 3 seconds, the yellow banner pops up briefly and then gone.

Any console messages or other debugging possible?

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

in Terminal window:
/Applications/Sikuli-IDE.app/Contents/runIDE -d 3 -c

This logs everything to the terminal window.

Paste the output here.

Revision history for this message
kinetik (kinetik-e) said :
#4

Ok here you go:

[debug] Running on Java 6 (1.6.0_51-b11-456-10M4508)
[debug] --- Sikuli parameters ---
[debug] 1: -d
[debug] 2: 3
[debug] 3: -c
[debug] init user preferences
[debug] locale: en_US
[debug] ResourceLoaderBasic: SikuliX Package Build: 1.0.1 12SEP2013160242
[debug] ResourceLoaderBasic: Sikuli-IDE is running from /Applications folder
[debug] ResourceLoaderBasic: check: we are running on arch: x86_64
[debug] ResourceLoaderBasic: check: using Java at: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/
[debug] ResourceLoaderBasic: check: Exists libs folder at location of jar? YES: /Applications/SikuliX-IDE.app/Contents/
[debug] ResourceLoaderBasic: checkLibsDir: /Applications/SikuliX-IDE.app/Contents/libs
[debug] ResourceLoaderBasic: loadLib: MacUtil
[debug] ResourceLoaderBasic: loadLib: Found: MacUtil
[debug] ResourceLoaderBasic: loadLib: Now loaded: MacUtil
[debug] ResourceLoaderBasic: checkLibsDir: Using libs at: /Applications/SikuliX-IDE.app/Contents/libs
[debug] ResourceLoaderBasic: check: Using this as OCR directory (tessdata) too
[debug] Screen: initScreens: basic initialization (2 Screen(s) found)
[debug] *** monitor configuration (primary: 0) ***
[debug] Screen 0: S(0)[0,0 2560x1440]
[debug] Screen 1: S(1)[2560,242 1280x1024]
[debug] *** end monitor configuration ***
[debug] [I18N] menuShowThumbs
[debug] ResourceLoaderBasic: loadLib: MacHotkeyManager
[debug] ResourceLoaderBasic: loadLib: Found: MacHotkeyManager
[debug] ResourceLoaderBasic: loadLib: Now loaded: MacHotkeyManager
[debug] Sikuli-IDE startup: 3832

Revision history for this message
kinetik (kinetik-e) said :
#5

This is what I get when I use that to run the script:

running SikuliX-IDE: -Xmx512M -Dapple.laf.useScreenMenuBar -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine
-jar /Applications/SikuliX-IDE.app/Contents/sikuli-ide.jar -d 3 -c /Volumes/GraphicsXRaid/04 Elements/_AE_Scripts_Effects/scripts from Kevin/Index Comps From Projects/Suppress_AE_Dialogs.sikuli
[debug] Running on Java 6 (1.6.0_51-b11-456-10M4508)
[debug] --- Sikuli parameters ---
[debug] 1: -d
[debug] 2: 3
[debug] 3: -c
[debug] 4: /Volumes/GraphicsXRaid/04
[debug] 5: Elements/_AE_Scripts_Effects/scripts
[debug] 6: from
[debug] 7: Kevin/Index
[debug] 8: Comps
[debug] 9: From
[debug] 10: Projects/Suppress_AE_Dialogs.sikuli
[debug] init user preferences
[debug] locale: en_US
[debug] ResourceLoaderBasic: SikuliX Package Build: 1.0.1 12SEP2013160242
[debug] ResourceLoaderBasic: Sikuli-IDE is running from /Applications folder
[debug] ResourceLoaderBasic: check: we are running on arch: x86_64
[debug] ResourceLoaderBasic: check: using Java at: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/
[debug] ResourceLoaderBasic: check: Exists libs folder at location of jar? YES: /Applications/SikuliX-IDE.app/Contents/
[debug] ResourceLoaderBasic: checkLibsDir: /Applications/SikuliX-IDE.app/Contents/libs
[debug] ResourceLoaderBasic: loadLib: MacUtil
[debug] ResourceLoaderBasic: loadLib: Found: MacUtil
[debug] ResourceLoaderBasic: loadLib: Now loaded: MacUtil
[debug] ResourceLoaderBasic: checkLibsDir: Using libs at: /Applications/SikuliX-IDE.app/Contents/libs
[debug] ResourceLoaderBasic: check: Using this as OCR directory (tessdata) too
[debug] Screen: initScreens: basic initialization (2 Screen(s) found)
[debug] *** monitor configuration (primary: 0) ***
[debug] Screen 0: S(0)[0,0 2560x1440]
[debug] Screen 1: S(1)[2560,242 1280x1024]
[debug] *** end monitor configuration ***
[debug] [I18N] menuShowThumbs
[debug] ResourceLoaderBasic: loadLib: MacHotkeyManager
[debug] ResourceLoaderBasic: loadLib: Found: MacHotkeyManager
[debug] ResourceLoaderBasic: loadLib: Now loaded: MacHotkeyManager
[debug] Sikuli-IDE startup: 2772

Revision history for this message
kinetik (kinetik-e) said :
#6

That time, the script again looks like it launches but directly to the IDE and no dialog. But the IDE is completely blank, the script isn't inside it.

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

This is how it works:
/Applications/SikuliX-IDE.app/Contents/runIDE -r "/Volumes/GraphicsXRaid/04 Elements/_AE_Scripts_Effects/scripts from Kevin/Index Comps From Projects/Suppress_AE_Dialogs.sikuli"

the parameter to run a script is -r and since the path has blanks it must be quoted

Revision history for this message
kinetik (kinetik-e) said :
#8

Ok, so I just tried it that way too and got this error below. But I think I found the answer—it's the number in the path name followed by a space. I can't even escape the space after the number and have it work.

TEST 1 (quoted path):

$ /Applications/SikuliX-IDE.app/Contents/runIDE -r "/Volumes/GraphicsXRaid/04 Elements/_AE_Scripts_Effects/scripts from Kevin/Index Comps From Projects/Suppress_AE_Dialogs.sikuli"
running SikuliX-IDE: -Xmx512M -Dapple.laf.useScreenMenuBar -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine
-jar /Applications/SikuliX-IDE.app/Contents/sikuli-ide.jar -r /Volumes/GraphicsXRaid/04 Elements/_AE_Scripts_Effects/scripts from Kevin/Index Comps From Projects/Suppress_AE_Dialogs.sikuli
[error] FileManager: Not a valid Sikuli script: /Volumes/GraphicsXRaid/04.sikuli
[error] Terminating SikuliX after a fatal error! Sorry, but it makes no sense to continue!
If you do not have any idea about the error cause or solution, run again
with a Debug level of 3. You might paste the output to the Q&A board.

TEST 2 (quoted and escaped path):

$ /Applications/SikuliX-IDE.app/Contents/runIDE -r "/Volumes/GraphicsXRaid/04\ Elements/_AE_Scripts_Effects/scripts\ from\ Kevin/Index\ Comps\ From\ Projects/Suppress_AE_Dialogs.sikuli"
running SikuliX-IDE: -Xmx512M -Dapple.laf.useScreenMenuBar -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine
-jar /Applications/SikuliX-IDE.app/Contents/sikuli-ide.jar -r /Volumes/GraphicsXRaid/04\ Elements/_AE_Scripts_Effects/scripts\ from\ Kevin/Index\ Comps\ From\ Projects/Suppress_AE_Dialogs.sikuli
[error] FileManager: Not a valid Sikuli script: /Volumes/GraphicsXRaid/04\.sikuli
[error] Terminating SikuliX after a fatal error! Sorry, but it makes no sense to continue!
If you do not have any idea about the error cause or solution, run again
with a Debug level of 3. You might paste the output to the Q&A board.

Typically I call my Sikuli from a shell script using escaped characters:

/Volumes/GraphicsXRaid/04\ Elements/_AE_Scripts_Effects/scripts\ from\ Kevin/Index\ Comps\ From\ Projects/Suppress_AE_Dialogs.sikuli

But I just ran a quoted version of the escaped path (TEST 2) and also got a similar output. BUT, this time I noticed what it's doing. The output says:

[error] FileManager: Not a valid Sikuli script: /Volumes/GraphicsXRaid/04\.sikuli

This is interesting because even though the space after the 04 in the path name is escaped and the entire path is quoted, it's tried to truncate my path name to "/Volumes/GraphicsXRaid/04\.sikuli" instead of "/Volumes/GraphicsXRaid/04\ Elements/_AE_Scripts_Effects/scripts\ from\ Kevin/Index\ Comps\ From\ Projects/Suppress_AE_Dialogs.sikuli"

I just moved my script to another test directory without a leading number followed by a space and Sikuli is working normally. I can double click and open the script file and it opens fine, as well as launch the script from command line and it works as expected. Is the leading number followed by a space crash a bug or am I missing something?

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

thanks for the detailed evaluation.

this is a bug.

Can you help with this problem?

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

To post a message you must log in.