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.45k stars 1.26k forks source link

encoding problems when using locateonscreen #739

Open giantchen2012 opened 2 years ago

giantchen2012 commented 2 years ago

Hi, three. when i use file path with chinese characters as parameter passing to locateOnScreen, the program crashed bacause of that opencv didn't find my picture file, while the file path is wrong for unproper encoding. Any ideas to trade off this problem, to allow me use chinese char in my file path? is it convinient to patch on pyautogui soruce code?

my working settings: OS: windows 11 professional chinese python: python 3.8.10 pyautogui: pyautogui 0.9.53