Python Forum
Facing issue with pyautogui program after PC upgrade - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Facing issue with pyautogui program after PC upgrade (/thread-19774.html)



Facing issue with pyautogui program after PC upgrade - Utkarsh29 - Jul-13-2019

Hi All,

I have done one surface automation program & it's was working fine. but after upgrade/window installation including Anaconda new version. I am facing many issues like ctypes.ArgumentError: argument 1: <class 'TypeError'>:. even for the simple mouse input function like pyautogui.position()
Not sure the reason, can you please support on this.
Thanks,


RE: Facing issue with pyautogui program after PC upgrade - Larz60+ - Jul-14-2019

please show code


RE: Facing issue with pyautogui program after PC upgrade - Utkarsh29 - Jul-15-2019

lot's similar kind of issues..Like this is previously working.

CODE:-
import pygetwindow
pygetwindow.getWindowsWithTitle('NetScaler Gateway')[0]
---------------------------------------------------------------------------
Error:
ArgumentError Traceback (most recent call last) <ipython-input-14-53504b15fe9f> in <module> 1 import pygetwindow ----> 2 gw =pygetwindow.getWindowsWithTitle('NetScaler Gateway')[0] ~\AppData\Local\Continuum\anaconda3\lib\site-packages\pygetwindow\_pygetwindow_win.py in getWindowsWithTitle(title) 170 """Returns a list of Window objects that substring match the title. 171 """ --> 172 hWndsAndTitles = _getAllTitles() 173 windowObjs = [] 174 for hWnd, winTitle in hWndsAndTitles: ~\AppData\Local\Continuum\anaconda3\lib\site-packages\pygetwindow\_pygetwindow_win.py in _getAllTitles() 62 titles.append((hWnd, buff.value)) 63 return True ---> 64 enumWindows(enumWindowsProc(foreach_window), 0) 65 66 return titles ArgumentError: argument 1: <class 'TypeError'>: expected WinFunctionType instance instead of WinFunctionType