You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This functionality is an early implementation from the time we did not have image logging and could be confusing for newcomers that see both a last_needle and possibly some general image logging. It is also undermaintained with some incorrect type errors.
The best approach around it would be not to drop it entirely but to integrate it in the image logging as a "near minimal verbosity level" that just outputs images on find errors or similar behavior.
Best approach so far is not to drop it entirely but to integrate it in the image logging as a "near minimal verbosity level" that just outputs images on find errors or similar behavior.
I found that the old functionality seems to be GlobalConfig.save_needle_on_error, which saves last_finderror_needle.png and last_finderror_haystack.png inline in region.py before raising FindError.
My plan: route this through ImageLogger so that at the default ERROR level it dumps the needle/haystack only on find errors, then deprecate save_needle_on_error (with a DeprecationWarning).
A couple of questions:
Is this the right direction?
Is it fine that the dumped file names change to the usual imglog naming instead of last_finderror_*.png?
Activity
pevogam commentedon Feb 7, 2025
Best approach so far is not to drop it entirely but to integrate it in the image logging as a "near minimal verbosity level" that just outputs images on find errors or similar behavior.
[-]Deprecate last_needle functionality in Guibot[/-][+]Deprecate last_needle functionality[/+]lormafe34 commentedon Sep 29, 2026
Hi @pevogam , I'd like to work on this.
I found that the old functionality seems to be
GlobalConfig.save_needle_on_error, which saveslast_finderror_needle.pngandlast_finderror_haystack.pnginline inregion.pybefore raisingFindError.My plan: route this through
ImageLoggerso that at the default ERROR level it dumps the needle/haystack only on find errors, then deprecatesave_needle_on_error(with aDeprecationWarning).A couple of questions:
imglognaming instead oflast_finderror_*.png?Deprecate last_needle in favor of ImageLogger
Deprecate last_needle in favor of ImageLogger
Deprecate last_needle in favor of ImageLogger
Deprecate last_needle in favor of ImageLogger
Deprecate last_needle in favor of ImageLogger
Deprecate last_needle in favor of ImageLogger
Remove last_needle in favor of ImageLogger
Remove last_needle in favor of ImageLogger
Remove last_needle in favor of ImageLogger