Edit a .skl file + logs file to execution

Asked by Jose Lopez Morales

Hi,

When you generate a .sdk file, and you see that the flow isn´t correct, As I can edit the .sdk file to modify it?
The application was closed.

For another part, there are log file to execution sdk file ? where is it ?

I hope responses !
Thanks in advance.
Regards.

Question information

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

hope you are talking about .skl files ;)

--- content
they are just zipped versions of the original script folder you-name-it.sikuli
so just unzip and you are there.

--- log files
Sikuli itself does not write any logfiles.
If you run .skl scripts you do that from commandline. The output is shown in the command line window. So if you want to preserve it just pipe it to a text file: >mylog.txt at the end of the command.

Revision history for this message
Jose Lopez Morales (lopmorjo) said :
#2

Ok,

When i open the .py file, i see the following,

click("Ejemploztid1.png")
click("1311156963144.png")
click("1311156972068.png")
click("1311156982153.png")
click("Ejemploz1234.png")
click("1311157000560.png")
click("1311157009209.png")

I execute, and it´s fails. ( Don´t find the images ). Attach logs.

[error] Mensaje de error: Traceback (most recent call last): File "C:\Users\Lila\AppData\Local\Temp\sikuli-tmp3749042745848244047.py", line 1, in click("Ejemploztid1.png") File "C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\Region.py", line 119, in click Line 22, in file C:\Users\Lila\AppData\Local\Temp\sikuli-tmp3749042745848244047.py at org.sikuli.script.Region.handleFindFailed(Region.java:349) at org.sikuli.script.Region.wait(Region.java:420) at org.python.proxies.sikuli.Region$Region$1.super__wait(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) org.sikuli.script.FindFailed: FindFailed: can not find Ejemploztid1.png Line 22, in file C:\Users\Lila\AppData\Local\Temp\sikuli-tmp37490
42745848244047.py

What happens ? Should execute it without problems.

Thanks in advance.
Regards.

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

you have to restore it as a .sikuli folder, which has to have the same name as the .py file and contains all the images.

so if you have
some-name.skl

this has to be restored as

some-name.sikuli

containing
some-name.py
and all the image files referenced in some-name.py

what you load into IDE or run from commandline is some-name.sikuli.

Revision history for this message
Jose Lopez Morales (lopmorjo) said :
#4

Hi,

I restore as some-name-sikuli and with sikuli application, now see the images, but obtain the following error.

[error] Mensaje de error: Traceback (most recent call last): File "C:\Users\Lila\AppData\Local\Temp\sikuli-tmp594805403783923894.py", line 1, in click("Ejemploztid1.png") File "C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\Region.py", line 119, in click Line 22, in file C:\Users\Lila\AppData\Local\Temp\sikuli-tmp594805403783923894.py at org.sikuli.script.Region.handleFindFailed(Region.java:349) at org.sikuli.script.Region.wait(Region.java:420) at org.python.proxies.sikuli.Region$Region$1.super__wait(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) org.sikuli.script.FindFailed: FindFailed: can not find Ejemploztid1.png Line 22, in file C:\Users\Lila\AppData\Local\Temp\sikuli-tmp5948054
03783923894.py

Thanks in advance.
Regards.

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

ok, not sure if you have this (you write: some-name-sikuli ???) setup correctly:

some-name.sikuli

containing
some-name.py
and all the image files referenced in some-name.py

--- but if you are sure you have, then this error simply means, that the image "Ejemploztid1.png" with the first line click() was not found on the screen. Find out the reason.

Revision history for this message
Jose Lopez Morales (lopmorjo) said :
#6

Hi,

I checked the tree path and it´s correct.

But, I don´t understand why the application search in the file that is in "C:\Users\Lila\AppData\Local\Temp\sikuli-tmp594805403783923894.py" when the directory of proyect is C:\Users\Lila\Desktop\Crónicos\Automatizacion\Sikuli\prueba_ejecutable2.sikuli, and is in this when are the images.

 C:\Users\Lila\Desktop\Crónicos\Automatizacion\Sikuli\prueba_ejecutable2.sikuli

Thanks in advance.
Regards.

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

When you press RUN in the IDE, the content of the current tab is copied to the temp file, to hand it over to the internal interpreter. Sikuli IDE does not automatically save to the scripts .sikuli folder, to run the .py from there (it is a posted request bug).

This might be a bit confusing, but it is as it is ;-)

Another problem currently is, that the same error message comes up (FindFailed, image not found) when the image can not be found on the screen, and when the image file cannot be found on the disk or in the image path.

So if you are sure, the image files are in it's place, FindFailed means: image not found on screen at that time (if nothing else said: within the standard 3 seconds waiting time (about 3 to 6 search trials depending on region and image size)).

Revision history for this message
Jose Lopez Morales (lopmorjo) said :
#8

Hi,

This is a bit confusing, but it´s as it is.

I managed to find an alternative.!!

First ,If I execute the .sikuli folder to convert a .skl.
 If I need modify my proyect, unzip .skl and changed the .sikuli folder (.py & images) and press RUN in the IDE, this provoked an error (previous post).(FindFailed, image not found: the image is in the screen, but can´t found the image file in temp directory

Solution:

changed the .sikuli folder (.py & images) and convert a .skl. Execute and you can see the new .sikuli ( execute file-->.skl) with modifications.

Thanks in advance.
Regards.