From 0056ae44f56d7b0a5bcca02f37a6a38b2cf08809 Mon Sep 17 00:00:00 2001 From: Dillon DuPont Date: Wed, 6 Aug 2025 14:47:29 -0400 Subject: [PATCH] Disabled pyautogui FAILSAFE --- libs/python/computer-server/computer_server/handlers/linux.py | 1 + libs/python/computer-server/computer_server/handlers/macos.py | 1 + libs/python/computer-server/computer_server/handlers/windows.py | 1 + 3 files changed, 3 insertions(+) diff --git a/libs/python/computer-server/computer_server/handlers/linux.py b/libs/python/computer-server/computer_server/handlers/linux.py index 5429b1a2..34a63de5 100644 --- a/libs/python/computer-server/computer_server/handlers/linux.py +++ b/libs/python/computer-server/computer_server/handlers/linux.py @@ -23,6 +23,7 @@ logger = logging.getLogger(__name__) # This allows the server to run in headless environments try: import pyautogui + pyautogui.FAILSAFE = False logger.info("pyautogui successfully imported, GUI automation available") except Exception as e: diff --git a/libs/python/computer-server/computer_server/handlers/macos.py b/libs/python/computer-server/computer_server/handlers/macos.py index 0cba0ca3..ded73408 100644 --- a/libs/python/computer-server/computer_server/handlers/macos.py +++ b/libs/python/computer-server/computer_server/handlers/macos.py @@ -1,4 +1,5 @@ import pyautogui +pyautogui.FAILSAFE = False from pynput.mouse import Button, Controller as MouseController from pynput.keyboard import Key, Controller as KeyboardController import time diff --git a/libs/python/computer-server/computer_server/handlers/windows.py b/libs/python/computer-server/computer_server/handlers/windows.py index 485aff4a..2d91ce53 100644 --- a/libs/python/computer-server/computer_server/handlers/windows.py +++ b/libs/python/computer-server/computer_server/handlers/windows.py @@ -18,6 +18,7 @@ logger = logging.getLogger(__name__) # Try to import pyautogui try: import pyautogui + pyautogui.FAILSAFE = False logger.info("pyautogui successfully imported, GUI automation available") except Exception as e: logger.error(f"pyautogui import failed: {str(e)}. GUI operations will not work.")