Python-UIAutomation-for-Windows icon indicating copy to clipboard operation
Python-UIAutomation-for-Windows copied to clipboard

找控件, 经常会间歇性的遇到这个问题 _ctypes.COMError

Open hzh-hzh opened this issue 3 years ago • 4 comments

if not profile_hyperlink.Exists(15):

File "C:\Users\C950R_V18_Athena\AppData\Local\Programs\Python\Python39\lib\site-packages\uiautomation\uiautomation.py", line 6387, in Exists control = FindControl(self.searchFromControl, self._CompareFunction, self.searchDepth, False, self.foundIndex) File "C:\Users\C950R_V18_Athena\AppData\Local\Programs\Python\Python39\lib\site-packages\uiautomation\uiautomation.py", line 8288, in FindControl for child, depth in WalkControl(control, findFromSelf, maxDepth): File "C:\Users\C950R_V18_Athena\AppData\Local\Programs\Python\Python39\lib\site-packages\uiautomation\uiautomation.py", line 8169, in WalkControl child = lastControl.GetFirstChildControl() File "C:\Users\C950R_V18_Athena\AppData\Local\Programs\Python\Python39\lib\site-packages\uiautomation\uiautomation.py", line 6256, in GetFirstChildControl ele = _AutomationClient.instance().ViewWalker.GetFirstChildElement(self.Element) _ctypes.COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None))

hzh-hzh avatar Aug 14 '21 13:08 hzh-hzh

image

yinkaisheng avatar Sep 26 '21 03:09 yinkaisheng

这个问题还是挺常出现的

xiaohuihui093 avatar Feb 17 '22 05:02 xiaohuihui093

第一遍打卡窗口执行GetValuePattern().SetValue(info) ,反复多次操作都没有问题,但关闭窗口后再打开,再次执行GetValuePattern().SetValue(info) ,必现报 File "D:\soft_install\python3.8.8\lib\site-packages\uiautomation\uiautomation.py", line 5541, in SetValue ret = self.pattern.SetValue(value) == S_OK _ctypes.COMError: (-2147220992, None, (None, None, None, 0, None))

yuanweihuaskhb avatar Oct 18 '22 06:10 yuanweihuaskhb