[1.1.1] Image taken at runtime isn't updated in Sikuli --- HowTo force the update
--- How to force the update:
*** to permanently switch off image caching use:
... from that time on every image will be loaded from its file whenever used
*** to force the reload of an image after having changed its file content during runtime of the script while image caching is not switched of:
(only works with version 1.1.1 after 2017-02-25)
... where image is the same string that is used to define the image - example
img = "someImage.png"
find(img) # old version used
# do something to change the content of the image file
Image.reload(img) # or
find(img) # new version used
My sikuli application takes a snapshot of a user selection in a dropdown list.
It then does various actions with this screenshot, and finishes its execution.
This works brilliantly.
When the user runs the script again, it overwrites the image file with the new dropdown selection. (as it should)
But for some reason, the second time, it continues looking for the original screenshot.
If I close & reopen Sikuli, it then registers the updated screenshot and works fine.
It seems like the original image is cached, despite it being overwritten by Sikuli.
So I've tried using: Image.reload(
I've also tried using: Settings.
Despite that, it works the first execution, fails on the second. But works if Sikuli is restarted.
Any help would be very appreciated!