[2.0.5] IDE: macOS: runScript: [error] ImagePath: find: not there: xxx.png

Asked by Ben Dix on 2021-03-02

Hey Folks,
thx for the new Release πŸ˜„

but I am having trouble with my scripts, that worked fine on 2.0.4.

While running scripts inside the main scrip using "runscript", the imagepath seems to be wrong.
so far I added every imagepath manually after returning to the main script.

now I get an error:

[error] ImagePath: find: not there: xxx.png

any ideas?

greetings

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
2021-03-06
Last reply:
2021-03-07
Chetan (cshamdas) said : #1

this is similar t ohttps://bugs.launchpad.net/sikuli/+bug/1917408 that we are also facing in 2.0.5

RaiMan (raimund-hocke) said : #2

Please look at my answer in the related bug.

Could you please paste the folder/filenames here of the failing scripts and the problematic images. Thanks.

Ben Dix (bendix80) said : #3

Well, in my case, I am starting a main file and importing a Settings.sikuli File that contains all my definitions, then using runscript(another files) to execute my commands - some of them are also nested.

While returning to the main script or nested ones, I added the Image Path import manually, that was the way it worked fine.

For the moment I switched back to 2.0.4., working fine again.

so no hurry πŸ˜„

greetings and lots of thx for your great work πŸ˜„

Ben Dix (bendix80) said : #4

all pics are *.png files, shot by the IDE itself...

RaiMan (raimund-hocke) said : #5

Could you please try again with 2.0.5: new artifacts with a fix are online. Thanks.

Ben Dix (bendix80) said : #6

thx rainman!

 will do this evening and report as soon as possible πŸ˜„

RaiMan (raimund-hocke) said : #7

I just tested with the new version:

After a runScript, the bundlePath is restored to what it was before the runScript (ImagePath entry 0)

So there should be no need to do anything with respect to the bundlePath.

The other ImagePath entries remain as they were, when terminating the script called with runScript (hence entries added by the called script remain in the ImagePath)

Ben Dix (bendix80) said : #8

Hey RainMan,

I've tried the new downloaded 2.0.5 version again, but my script failed :(

My Start.sikuli file starts fine, but after importing the first script using runscript, all image paths seems to be corrupt.
My start script imports the imagepaths of itself after returning from the script again, cause this works fine in 2.0.4 for me.

All scripts are in the same folder, all permissions are set correctly ( I reset them a few times to be clear), but it fails...

My setup:

Mac mini - running Catalina
Java 11
Using IDEsikulix - by terminal execution

all working fine in 2.0.4, so I switched back again to be safe for the moment.

greetings

Ben Dix (bendix80) said : #9

in addition:
there are no blank spaces inside my folder or file names.
Maybe this problem is not the same as mentioned in the bug.

RaiMan (raimund-hocke) said : #10

Could you give me some sample code, so I can really understand what you are doing.

I only need the essential steps.

You might send to sikulix---at---outlook---dot---com

Ben Dix (bendix80) said : #11

Done πŸ˜„

RaiMan (raimund-hocke) said : #12

Did not receive anything ---- I thought ;-)
... but it was taken as SPAM - LOL.

I will check and come back here.

Ben Dix (bendix80) said : #13

fyi

tested 2.0.5 also on MacBook Pro, using java 14.
looks like its working fine so far πŸ˜„

maybe a java related problem?
My Mac mini ist running still on java 11

Ben Dix (bendix80) said : #14

using java 15 - sorry.... it's 15

RaiMan (raimund-hocke) said : #15

Generell recommendation:
If there is no other reason for using non-LTS Java versions, it is strongly recommended to either use the latest Java 8 or the latest Java 11. SikuliX will support Java 8 as long as it is officially supported and Java 11 as the current LTS version.

Problems with non-LTS Java versions (currently Java 15) and pre-final versions like Java 16 and Java 17, must be reproduced with Java 11 to be accepted for evaluation.

RaiMan (raimund-hocke) said : #16

Since your image-not-found problem is on Java 11, I need the path's you are using for your scripts and images and an offending sample. You might send the stuff to me privately.

Ben Dix (bendix80) said : #17

Even on Sunday πŸ˜„
I am using my MacBook Pro for testing right now and rebuilding my whole script.
Now I am using only one main script, import only two Sikuli files, one containing only images and defined regions and the other all definitions.
My old script was a result of too many trial and error moments and for sure, this was/is the biggest problem.
Your little test script was a great starting point for my new script - very clean and clear - thx again for that.

this is working fine so far on my MacBook Pro using Java 15 and 2.0.5 πŸ˜„
I will take this script as soon as finished to my Mac mini server and test it, also on a windows machine next week.
thx RainMan πŸ˜„

RaiMan (raimund-hocke) said : #18

ok, I will close this now.

Wir reden dann weiter privat ΓΌber Deine Fortschritte.
Du weißt ja wo mein Maileingang wohnt ;-)
Bleib gesund.