What is wrong with using a bare 'except'? [duplicate]
问题 This question already has answers here : About catching ANY exception (8 answers) Closed 10 months ago . I tried making a function to check if an image is displayed on the screen using PyAutoGui and came up with this: def check_image_on_screen(image): try: pyautogui.locateCenterOnScreen(image) return True except: return False And it works fine, but PyCharm tells me I shouldn't leave except bare. What is the problem with leaving it like this? Is there a more appropriate way of creating the