".skl" is not running - jython

I have a sikuli code, which is running well on Sikuli IDE. Then I converted it into .skl file. When I run the .skl, it throws 30-40 lines of error and when I run the actual sikuli program on Sikuli IDE it is running well. I don't have Python IDLE in my system and errors that I got is
Since the first 22 lines are not visible, I pasting it below :-
Runtime Error when running C:\DOCUME~1\t6-test\LOCALS~1\Temp\tmp-664999291.sikuli\test.sikuli
Traceback (most recent call last):
File "<string>",line 1,in <module>
File "C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\_init_.py",line 3, in <module>
File "C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\sikuli.py", line 26, in <module>
java.lang.UnsatisfiedLinkError:C:\Program Files\Sikuli X\libs\Win32Util.dll:Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:44)
at org.sikuli.script.Win32Util.<clinit>(Win32Util.java:19)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.sikuli.script.Env.getOSUtil(Env.java:91)
at org.sikuli.script.App.<clinit>(App.java:9)
at java.lang.class.forName0(Native Method)
at java.lang.class.forName(Unknown Source)
at org.python.core.Py.loadAndInitClass(Py.java:895)
at org.python.core.Py.findClassInternal(Py.java:830)
at org.python.core.Py.findClassEx(Py.java:881)
And the rest which is visible on the screen is following :-
And my code is :-
popup("Hello")
print("Hello")
I am using windows xp os and sikuli r930. Another things is that I ran the same .skl file in another file which has same os and sikuli version. But the code was working well in that system. Could anyone tell me where I am going wrong??

I recommend running skl script according to Sikuli official manual: http://doc.sikuli.org/faq/010-command-line.html which means it should be done using command line.
To solve your problem, open console window and type something like this (change directory paths according to your setup):
"c:\Program Files\Sikuli X\Sikuli-IDE.bat" -r "c:\sikuli\someScript.skl"
I've never started skl scripts via double click. I always start them using batch files (actually batch scripts are invoked by other non-sikuli scripts).

--- as already suggested on your launchpad question:
The error image is not complete.
You say, you get the same error, when using the suggestion to run the .skl using Sikuli-IDE.bat.
You get some Java exception at startup. The error message and stacktrace is displayed in a popup, that does not show all lines and is not scrollable.
To get the complete information, you have tell the IDE, to print everything to the command line window.
This is how you tell it:
- open a copy of Sikuli-IDE.bat in an editor
- on the line, that calls java and has the -X, -D, -jar options add the following option (before the -jar option)
-Dsikuli.console=false
- take care, that this modified Sikuli-IDE.bat (use a different name ;-) is available in the Sikuli X program folder
- use it to run your .skl the same way you did with the original SIKULI-IDE.bat
This should print the complete error/stack trace information in the command line window.
Pls. make it somehow available in the net for inspection.

Right click your .skl file. Go to properties. Change the Opens With default path to wherever your Sikuli-IDE.exe is located. In my case it is D:\Sikuli X\Sikuli-IDE.exe
Now double click the .skl file, it shall run.
Alternatively,
Go to Command line,
Type:-
C:\Windows\System32>"D:\Sikuli X\Sikuli-IDE.exe" -r D:\picapica.skl

RightClickyour executable SKL file -> select Proprities ->open with Sikuli-IDE.bat
(it will initiate IDE with proper jre configuration) its perfectly working in my end(you can see logs from java console)

Related

locusts-plugins: FileNotFoundError: [WinError 2] The system cannot find the file specified

I've installed the locusts-plugins along with the other required modules as shown in the setup.py:
"locust>=1.4.3",
"psycogreen",
"psycopg2-binary",
"websocket-client",
"python-dateutil",
"pymongo",
"confluent-kafka",
"selenium>=4.0.0.b2",
"lxml",
"opencensus-ext-azure"
But when I attempt to run any of the examples using the webdrivers I get the error:
File "c:\users\mjohns33\pycharmprojects\pythonproject\venv\lib\site-packages\gevent\subprocess.py", line 1270, in _execute_child
hp, ht, pid, tid = CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
2021-04-12T20:11:44Z <Greenlet at 0x55012d0: > failed with FileNotFoundError
I have the standalone server running and chromedriver in the path, is there something I'm missing?
Thanks for the full callstack. The command that it is complaining about is killall, which is not available on Windows.
I've only ever run WebdriverUser on Mac and Linux. It might work if you just comment out that line (c:\users\mjohns33\pycharmprojects\pythonproject\venv\lib\site-packages\locust_plugins\users\webdriver.py, line 127)
(and manually kill chromedriver as needed)
I figured out that the locust-plugins is all-inclusive, meaning you don't want to install selenium or any other modules. Python, locust and locust-plugins, that's it.
I still see new errors but just having what's needed clears up a lot of these issues.

How do I run the code from a scratch file in IntelliJ 14?

I've created a simple Java scratch file containing a class named "TestGenerics" containing some code and a main method.
The code seems to be fine, however when I try to run it (by right clicking > Run 'TestGenerics.main()', I get this error: "Module not specified"
Similar situation occurs with a scratch file containing Lua code, error message: 'Error running scratch.1 (2): Executable is not specified'
Any ideas?
This was previously not possible, but is now supported for some languages. such as Java and Ruby. For these languages, you should be able to run the scratch file in the same way as you run any other file.

Task Scheduler + Intermittantly failing + How do you debug or get a dump + windows7

I have 5 scheduled tasks that are scheduled to run every day at 9.30am. The schedule is basically a vbs script that opens an excel workbook and runs a macro. These 5 schedules can run fine if i run them seperately and 9 times out of 10 they run fine if I simulataneously run them from task scheduler. I do this by highlighting them all and then pressing run.
But sometimes when the task scheduler is doing its schedule they will fail. Sometimes all of them fail, sometimes some of them fail, but most of the time they all succeed.
Once I okay the errors(will post this next time it occurs) I can see the excel.exe in my Processes in TaskManager they are left hanging. I cannot see them in Applications because I run them in the background. Whilst here I know I can right click on the excel.exe and do a Create Dump file, but not sure what to do with this.
What I am interested here is discovering why they are failing? How do I debug it? Can I get a dump? how do i do this? I am sure the code is not perfect but the fact that they run fine seperately and most of the time fine together I am wondering is some memory resource getting used up at this time. This is what I would like to find out.
I know that i could space them out to run every minute, and this is something I might do but I would like to answer my questions above first.
Note: The vbs script in question can be found here in a previous question I asked.
EDIT1 Some useful links I have come accross following Noodles answer:
WinDBG: The very basics
question re: reading dump file
EDIT2
If i right click on check for a solution I can click on View Technical Details and that gives me:
`
Description
Faulting Application Path: C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE
Problem signature
Problem Event Name: APPCRASH
Application Name: EXCEL.EXE
Application Version: 14.0.7128.5000
Application Timestamp: 5398dfdc
Fault Module Name: EXCEL.EXE
Fault Module Version: 14.0.7128.5000
Fault Module Timestamp: 5398dfdc
Exception Code: c0000005
Exception Offset: 0023e751
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 5129
Additional Information 1: 8bde
Additional Information 2: 8bdedbea09a2027adb218b0e009eebf2
Additional Information 3: d4c1
Additional Information 4: d4c17b47443511f18e75ae920aa444bd
Extra information about the problem
Bucket ID: 361665432
`
EDIT3 : A useful walkthough example with commands
Crash Dumps
Load in Windbg. Then File menu - Open Crash Dump. Type !analyze (note wrong spelling)
Debugging
You can also start in a debugger.
windbg or ntsd (ntsd is a console program and maybe installed). Both are also from Debugging Tools For Windows.
Download and install Debugging Tools for Windows
http://msdn.microsoft.com/en-us/windows/hardware/hh852363
Install the Windows SDK but just choose the debugging tools.
Create a folder called Symbols in C:\
Start Windbg. File menu - Symbol File Path and enter
srv*C:\symbols*http://msdl.microsoft.com/download/symbols
then
windbg -o -g -G c:\windows\system32\cmd.exe /k batfile.bat
You can press F12 to stop it and kb will show the call stack (g continues the program). If there's errors it will also stop and show them.
Type lm to list loaded modules, x ! to list the symbols and bp symbolname to set a breakpoint
If programming in VB6 then this environmental variable link=/pdb:none stores the symbols in the dll rather than seperate files. Make sure you compile the program with No Optimisations and tick the box for Create Symbolic Debug Info. Both on the Compile tab in the Project's Properties.
Also CoClassSyms (microsoft.com/msj/0399/hood/hood0399.aspx) can make symbols from type libraries.
You can schedule this command line instead.
Autostarting Programs in Debugger
You can also make windbg attach to any specific program when started. See gflags.exe. Only in GUI mode.
Errors
Also get the error number. TS keeps a history of runs and their errors. TS has a history tab.
.

Cannot auto configure pydev in eclipse

I have installed PyDev successfully, I have python 3.4.0 installed successfully and the folder containing python.exe is in my path and I can run it from the command line.
However, when I go to window\preferences\pydev\interpreters\python interpreter and select 'quick auto-config' to configure it using normal python I get an error saying 'auto configurator could not find a valid interpreter... Note the system environment variables used for Jython are PATH and PYTHONHOME.'
Unless this is a bug in the text I am not selecting Jython (I get a different error if I select IronPython, btw, so this is not a generic error message).
The trace is as follows:
Errors getting info on discovered interpreter(s).
See error log for details.
java.lang.RuntimeException: java.io.IOException: Cannot run program "python": CreateProcess error=2, The system cannot find the file specified
As I say, python.exe is in my path.
You have to install the actual python package separately from here https://www.python.org/download
Close LiClipse/Eclipse => Download Python Here: https://www.python.org/download
=> reopen LiClipse => Auto Config for the interpreter Will WORK!
I found the answer, but I'll leave this up in case anyone else gets it. It's a pretty stupid auto config option if you ask me ;)
In the higher level window\preferences\pydev\interpreters\ preference you need to untick jython and ironpython.
No idea why given I selected the Python sub-preference specifically.

Unable to open a saved Gephi project file

Recently I worked on a project done in the network visualization and analysis software Gephi, and I saved it with the ".gephi" extension. However, when I try to reopen the file, it gives the following error message:-
"The project file couldn't be opened. Please check the file has .gephi extension.
XMLStreamException - ParseError at [row,col]:[1,1]
Message: Premature end of file."
I'm a beginner in Gephi and only an amateur programmer. I do not understand this error message, and thus have no ideas on how to resolve it. I tried updating Gephi to the latest version. I also tried to open the file from within Gephi. Neither of those steps have resolved the problem. Can anyone help me out with this, please?
The error message "premature end of file" means that the xml file was not complete. I suppose that the whole file is empty or just the xml part of the file. so maybe the file got corrupted while saving.
Can you try to open the file with notepad or a hexeditor to verify that it has some content?
There must be some bug on the gephi files writing or reading process.
In order to identify the problem it would help if you can post a gephi log file when each error happens.
You can find the log file on gephi user directory (check http://wiki.gephi.org/index.php/Troubleshooting)
For example in Windows 7 the path is C:\Users\Your_User\AppData\Roaming.gephi\dev\var\log\messages.log
Also, if you can share the files, it will be easier to fix.
This could be related to an open bug where Java6 is used to save the gephi file and then Java7 is used to load the file, say on a different machine.
The jdk used by Gephi can be specified in /etc/gephi.conf or alternatively it can be specified as a parameter --jdkhome when launching Gephi.
The problem is with java and javac:
If you created your gephi file with open java-6-openjdk (for example) and then you sitch your java to java-7-openjdk, then this problem surges.
I fix my gephi returning to the same java and javac executables in Linux by:
(In terminal)
sudo update-alternatives --config java
and then
(In terminal)
sudo update-alternatives --config javac
Hope this can help!