Skip to content

脚本偶尔报错 #3

@Tyler050121

Description

@Tyler050121

Exception in thread Thread-2 (process): Traceback (most recent call last): File "C:\Users\XuanMeng\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Users\XuanMeng\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "C:\Users\XuanMeng\AppData\Local\Programs\Python\Python310\lib\site-packages\keyboard\_generic.py", line 58, in process if self.pre_process_event(event): File "C:\Users\XuanMeng\AppData\Local\Programs\Python\Python310\lib\site-packages\keyboard\__init__.py", line 218, in pre_process_event callback(event) File "C:\Users\XuanMeng\AppData\Local\Programs\Python\Python310\lib\site-packages\keyboard\__init__.py", line 649, in <lambda> handler = lambda e: (event_type == KEY_DOWN and e.event_type == KEY_UP and e.scan_code in _logically_pressed_keys) or (event_type == e.event_type and callback()) File "C:\Users\XuanMeng\AppData\Local\Programs\Python\Python310\lib\site-packages\keyboard\__init__.py", line 637, in <lambda> callback = lambda callback=callback: callback(*args) File "C:\Users\XuanMeng\Desktop\Code\Coperate\PVZRandomScript--\main.py", line 132, in KeyPressAction ExecuteScript(4) File "C:\Users\XuanMeng\Desktop\Code\Coperate\PVZRandomScript--\main.py", line 85, in ExecuteScript pyautogui.moveTo(237 + Tool.left, 0, 0.00001)#到最上 File "C:\Users\XuanMeng\AppData\Local\Programs\Python\Python310\lib\site-packages\pyautogui\__init__.py", line 593, in wrapper failSafeCheck() File "C:\Users\XuanMeng\AppData\Local\Programs\Python\Python310\lib\site-packages\pyautogui\__init__.py", line 1734, in failSafeCheck raise FailSafeException( pyautogui.FailSafeException: PyAutoGUI fail-safe triggered from mouse moving to a corner of the screen. To disable this fail-safe, set pyautogui.FAILSAFE to False. DISABLING FAIL-SAFE IS NOT RECOMMENDED.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions