From 06c5c27957b0661f252914cb6df0678918984b37 Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Fri, 30 Dec 2022 07:38:48 +0100 Subject: [PATCH] raise ImageNotFound instead of None cheat sheet Make cheat sheet comply with detailed image detection documentation --- docs/quickstart.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index dffd298..6c4a839 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -144,7 +144,7 @@ The `locateCenterOnScreen()` function just returns the XY coordinates of the mid >>> pyautogui.locateCenterOnScreen('looksLikeThis.png') # returns center x and y (898, 423) -These functions return `None` if the image couldn't be found on the screen. +These functions raise `ImageNotFoundException` if the image couldn't be found on the screen (versions before 0.9.41 returned `None` instead). Note: The locate functions are slow and can take a full second or two.