With the previous version of pyautogui, when an image wasn't found the return was "None", so I used to handle it with except TypeError:.
But since the update (version 0.9.41), it isn't working, as it's returning ImageNotFoundException, but it isn't recognised as an exception. When I try to do except ImageNotFoundException: it gives the error:

[E0712] Catching an exception which doesn't inherit from Exception: ImageNotFoundException

How should this error be handled?
I had the same problem as you, and also couldn't figure out why handling this with an except wasn't possible. Now I have figured it out on python 3.7, this should work if you've installed the PyScreeze package:
from pyscreeze import ImageNotFoundException
I hope it can help you out :)
Python PyAutoGUI return "ImageNotFoundException", but "except" doesn't recognise it as an exception