Activity log for bug #1857225

Date Who What changed Old value New value Message
2019-12-22 10:13:01 RaiMan bug added bug
2019-12-22 10:13:21 RaiMan sikuli: status New Fix Committed
2019-12-22 10:13:26 RaiMan sikuli: importance Undecided High
2019-12-22 10:13:30 RaiMan sikuli: assignee RaiMan (raimund-hocke)
2019-12-22 10:13:33 RaiMan sikuli: milestone 2.0.2
2019-12-22 10:23:17 RaiMan summary [2.0.1] IDE: script load: absolute image filenames produce "not found" errors [2.0.1] IDE: script load: absolute image filenames produce "not found" errors --- workaround
2019-12-22 11:37:59 RaiMan description 2.0.1-2019-11-22_16:54/Mac10.15.2/Java13(64)13.0.1+9 When I open a script in the IDE I get many Errors regarding ImagePath e.g. [error] ImagePath: find: File does not exist: /home/jeff/SikuliScripts_Linux/Code/Data/Images/Ruler.png [error] ImagePath: find: File does not exist: /home/jeff/SikuliScripts_Linux/Subs/Images/Sikuli.png There is maybe 40 of these errors listed all to do with where the Images are stored on different machines Why do I get these The Code that is causing this is :- if g_Running_Version == "Mac": v_Image = "/Users/Jeff/Documents/Sikuli_Live/SikuliScripts/Vikings/Code/Data/Images_Mac/Ruler.png" g_This_Ruler = Pattern(v_Image).similar(.9) else: g_This_Ruler = "/home/jeff/SikuliScripts_Linux/Code/Data/Images/Ruler.png" The IDE does not know that g_Running_Version = "Mac" on this machine and will not process this line ---- problem situation The IDE settings (Preferences) are so, that it is tried to show image thumbnails. If one uses image filenames, that will only become reasonable at runtime, you might get error messages about images, that cannot be found at time of script load or if you use the thumbnail switch (ctrl/cmd-t). - absolute image filenames (if not available in the current context) - relative image filenames not found in the bundlepath ---- workaround options - switch of thumbnails: Preferences -> more options ... -> show script as plain text = on - if the file ending is .png, leave it out: ".../img" instead of ".../img.png" - if it is not png: ".../img" + ".jpg" ------------------------------------------------------------------------- 2.0.1-2019-11-22_16:54/Mac1img0.15.2/Java13(64)13.0.1+9 When I open a script in the IDE I get many Errors regarding ImagePath e.g. [error] ImagePath: find: File does not exist: /home/jeff/SikuliScripts_Linux/Code/Data/Images/Ruler.png [error] ImagePath: find: File does not exist: /home/jeff/SikuliScripts_Linux/Subs/Images/Sikuli.png There is maybe 40 of these errors listed all to do with where the Images are stored on different machines Why do I get these The Code that is causing this is :- if g_Running_Version == "Mac":     v_Image = "/Users/Jeff/Documents/Sikuli_Live/SikuliScripts/Vikings/Code/Data/Images_Mac/Ruler.png"     g_This_Ruler = Pattern(v_Image).similar(.9) else:     g_This_Ruler = "/home/jeff/SikuliScripts_Linux/Code/Data/Images/Ruler.png" The IDE does not know that g_Running_Version = "Mac" on this machine and will not process this line
2019-12-22 11:38:04 RaiMan sikuli: status Fix Committed In Progress
2019-12-22 11:38:20 RaiMan sikuli: milestone 2.0.2 2.1.0
2019-12-22 11:38:32 RaiMan sikuli: importance High Medium
2019-12-22 12:45:53 RaiMan description ---- problem situation The IDE settings (Preferences) are so, that it is tried to show image thumbnails. If one uses image filenames, that will only become reasonable at runtime, you might get error messages about images, that cannot be found at time of script load or if you use the thumbnail switch (ctrl/cmd-t). - absolute image filenames (if not available in the current context) - relative image filenames not found in the bundlepath ---- workaround options - switch of thumbnails: Preferences -> more options ... -> show script as plain text = on - if the file ending is .png, leave it out: ".../img" instead of ".../img.png" - if it is not png: ".../img" + ".jpg" ------------------------------------------------------------------------- 2.0.1-2019-11-22_16:54/Mac1img0.15.2/Java13(64)13.0.1+9 When I open a script in the IDE I get many Errors regarding ImagePath e.g. [error] ImagePath: find: File does not exist: /home/jeff/SikuliScripts_Linux/Code/Data/Images/Ruler.png [error] ImagePath: find: File does not exist: /home/jeff/SikuliScripts_Linux/Subs/Images/Sikuli.png There is maybe 40 of these errors listed all to do with where the Images are stored on different machines Why do I get these The Code that is causing this is :- if g_Running_Version == "Mac":     v_Image = "/Users/Jeff/Documents/Sikuli_Live/SikuliScripts/Vikings/Code/Data/Images_Mac/Ruler.png"     g_This_Ruler = Pattern(v_Image).similar(.9) else:     g_This_Ruler = "/home/jeff/SikuliScripts_Linux/Code/Data/Images/Ruler.png" The IDE does not know that g_Running_Version = "Mac" on this machine and will not process this line ---- problem situation The IDE settings (Preferences) are so, that it is tried to show image thumbnails. If one uses image filenames, that will only become reasonable at runtime, you might get error messages about images, that cannot be found at time of script load or if you use the thumbnail switch (ctrl/cmd-t). - absolute image filenames (if not available in the current context) - relative image filenames not found in the bundlepath ---- workaround options - switch of thumbnails: Preferences -> more options ... -> show script as plain text = on - if the file ending is .png, leave it out: ".../img" instead of ".../img.png" - if it is not png: ".../img" + ".jpg" ---- intended solution The IDE should recognise a "setBundlePath(...)" near the top of the script and use it already at time of script load to resolve image filenames. Additionally it is possible to somehow evaluate the bundlepath depending on some environment settings (system, ...), which also can be evaluated by the IDE at time of scriptload based on some conventions. The further development of this solution can be tracked at https://github.com/RaiMan/SikuliX1/issues/272 ------------------------------------------------------------------------- 2.0.1-2019-11-22_16:54/Mac1img0.15.2/Java13(64)13.0.1+9 When I open a script in the IDE I get many Errors regarding ImagePath e.g. [error] ImagePath: find: File does not exist: /home/jeff/SikuliScripts_Linux/Code/Data/Images/Ruler.png [error] ImagePath: find: File does not exist: /home/jeff/SikuliScripts_Linux/Subs/Images/Sikuli.png There is maybe 40 of these errors listed all to do with where the Images are stored on different machines Why do I get these The Code that is causing this is :- if g_Running_Version == "Mac":     v_Image = "/Users/Jeff/Documents/Sikuli_Live/SikuliScripts/Vikings/Code/Data/Images_Mac/Ruler.png"     g_This_Ruler = Pattern(v_Image).similar(.9) else:     g_This_Ruler = "/home/jeff/SikuliScripts_Linux/Code/Data/Images/Ruler.png" The IDE does not know that g_Running_Version = "Mac" on this machine and will not process this line