Merge pull request #331 from trycua/fix/failsafes

[Computer-Server] Disable pyautogui FAILSAFE
This commit is contained in:
ddupont
2025-08-06 14:49:21 -04:00
committed by GitHub
3 changed files with 3 additions and 0 deletions

View File

@@ -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:

View File

@@ -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

View File

@@ -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.")