asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.22k stars 1.24k forks source link

Functions requiring number coordinates give incorrect error if given numbers as strings #789

Open kivipe opened 1 year ago

kivipe commented 1 year ago

If you pass coordinates as strings, you get an incorrect error message:

import pyautogui
pyautogui.moveTo('1', '2')
FileNotFoundError: [Errno 2] No such file or directory: '1'

Functions that require numbers should either try to convert the input to a number or give a correct error message.

EsJoseVi commented 1 year ago

I have made a commitment fixing your issue here is my approach #795