Hi there,
Thanks for providing this tool. I ran into one issue today. I am using the latest version of pywinauto on Windows 10 with one app coded on Winform.
After the following script is executed, I got the error message:
COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None))
Application(backend="uia").start(apptorun)
app = Application(backend="uia").connect(path = apptorun)
windowsMain = app['Main Window']
windowsMain.menu_select("Help->About")
So my question is :
1) Any idea why we have this error? It seems program is waiting for this window closed.
2) Do we have way to set timeout for menu_select?
Thanks,
Hi @taiqixp unfortunately there is no timeout for menu_select, though it's possible to use app.wait_cpu_usage_lower() to ensure app finished using CPU intensively (so some lazy initialization is done).
But usually such a COMError means something goes wrong inside invoke handler of the control (on app side). Or the element doesn't exist. Full traceback of the error would be more helpful.
What kind of app do you automate? Is it Qt5? or something more specific?
If it's available for download, please provide a link. I need to take a look.
Alright. I have one workaround now.
Thanks for your help.
windowsMain = app['Main Window']
help = windowsMain['Help'].select()
submenu = app['Dialog'] # Dropdown submenu is a top-level window
submenu['About'].click_input() # or .click_input()`
I am having a similar problem and worked around it using a similar method. See: Issue #621
My problem is that, even with the workaround, I get COMError when I attempt to write text into the application using the .set_edit_text method, even though the text is correctly being input.
I'm also hitting the same issue when I'm trying to click on a button which looks disabled but actually it is enabled. I'm unable to access that specific button since it is having wrapper
* _ctypes.COMError: (-2147220992, None, (None, None, None, 0, None))
I've gotten this error randomly for the past weeks, mostly when trying to input text into a "save as..." combobox (the error came from the automation interface SetValue()).
No idea what it's coming from, it seems to be better now that I focus() the combobox before inputing text.
I'm also having this problem. Even though I can get past it, now everything I type trips it.
So even doing print("hi") will cause the comerror until I restart my debugger.
it seems tied to a save as box for me as well.
_ctypes.COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None))
Unexpected error, recovered safely.
There is a chance that the COM error -2147220991 could be related to pywinauto internal caching of UIA interfaces. @basicAuto , you could try to patch temporarily your pywinauto installation and see if the problem goes away. To disable the caching you need to comment in this line in your pywinauto sources:
https://github.com/pywinauto/pywinauto/blob/5832acf8dd5a92852d3d5b328064f023b5d68e4a/pywinauto/controls/uiawrapper.py#L133
Another way to disable the caching is to remove @lazy_property decorator on UIAWrapper.iface_* methods.
This is an ongoing pain point for me as well. It's breaking my scrips... Is there any fix in the works or anything I can do about it myself?
I just get spammed down with this no matter how I interact with a save as window.
I tried the above fix from @airelil it hasn't changed the unfortunate behavior. I commented out that line 133 from uiawrapper.py but I don't know how to remove the @lazy_property decorator from that method.
_ctypes.COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None))
Unexpected error, recovered safely.
File already exists in directory executing overwrite
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 282, in frame_vars_to_xml
xml += var_to_xml(v, str(k), evaluate_full_value=eval_full_val)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 369, in var_to_xml
elif hasattr(v, "__len__") and not is_string(v):
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 379, in __getattribute__
ctrls = self.__resolve_control(self.criteria)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 250, in __resolve_control
ctrl = wait_until_passes(
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\timings.py", line 436, in wait_until_passes
func_val = func(*args, **kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 222, in __get_ctrl
ctrl = self.backend.generic_wrapper_class(findwindows.find_element(**ctrl_criteria))
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 84, in find_element
elements = find_elements(**kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 181, in find_elements
return [backend_obj.element_info_class(handle), ]
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\uia_element_info.py", line 71, in __init__
self._element = IUIA().iuia.ElementFromHandle(handle_or_elem)
_ctypes.COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None))
Unexpected error, recovered safely.
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 282, in frame_vars_to_xml
xml += var_to_xml(v, str(k), evaluate_full_value=eval_full_val)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 369, in var_to_xml
elif hasattr(v, "__len__") and not is_string(v):
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 379, in __getattribute__
ctrls = self.__resolve_control(self.criteria)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 250, in __resolve_control
ctrl = wait_until_passes(
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\timings.py", line 436, in wait_until_passes
func_val = func(*args, **kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 222, in __get_ctrl
ctrl = self.backend.generic_wrapper_class(findwindows.find_element(**ctrl_criteria))
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 84, in find_element
elements = find_elements(**kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 181, in find_elements
return [backend_obj.element_info_class(handle), ]
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\uia_element_info.py", line 71, in __init__
self._element = IUIA().iuia.ElementFromHandle(handle_or_elem)
_ctypes.COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None))
Unexpected error, recovered safely.
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 282, in frame_vars_to_xml
xml += var_to_xml(v, str(k), evaluate_full_value=eval_full_val)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 369, in var_to_xml
elif hasattr(v, "__len__") and not is_string(v):
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 379, in __getattribute__
ctrls = self.__resolve_control(self.criteria)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 250, in __resolve_control
ctrl = wait_until_passes(
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\timings.py", line 436, in wait_until_passes
func_val = func(*args, **kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 222, in __get_ctrl
ctrl = self.backend.generic_wrapper_class(findwindows.find_element(**ctrl_criteria))
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 84, in find_element
elements = find_elements(**kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 181, in find_elements
return [backend_obj.element_info_class(handle), ]
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\uia_element_info.py", line 71, in __init__
self._element = IUIA().iuia.ElementFromHandle(handle_or_elem)
_ctypes.COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None))
Unexpected error, recovered safely.
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 282, in frame_vars_to_xml
xml += var_to_xml(v, str(k), evaluate_full_value=eval_full_val)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 369, in var_to_xml
elif hasattr(v, "__len__") and not is_string(v):
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 379, in __getattribute__
ctrls = self.__resolve_control(self.criteria)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 250, in __resolve_control
ctrl = wait_until_passes(
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\timings.py", line 436, in wait_until_passes
func_val = func(*args, **kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 222, in __get_ctrl
ctrl = self.backend.generic_wrapper_class(findwindows.find_element(**ctrl_criteria))
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 84, in find_element
elements = find_elements(**kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 181, in find_elements
return [backend_obj.element_info_class(handle), ]
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\uia_element_info.py", line 71, in __init__
self._element = IUIA().iuia.ElementFromHandle(handle_or_elem)
_ctypes.COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None))
Unexpected error, recovered safely.
It will repeat this behavior even if you just send in a print() command. Can't find anyway to get out of this interaction besides restarting debugger.
print("hi")
hi
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 282, in frame_vars_to_xml
xml += var_to_xml(v, str(k), evaluate_full_value=eval_full_val)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 369, in var_to_xml
elif hasattr(v, "__len__") and not is_string(v):
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 379, in __getattribute__
ctrls = self.__resolve_control(self.criteria)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 250, in __resolve_control
ctrl = wait_until_passes(
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\timings.py", line 436, in wait_until_passes
func_val = func(*args, **kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 222, in __get_ctrl
ctrl = self.backend.generic_wrapper_class(findwindows.find_element(**ctrl_criteria))
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 84, in find_element
elements = find_elements(**kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 181, in find_elements
return [backend_obj.element_info_class(handle), ]
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\uia_element_info.py", line 71, in __init__
self._element = IUIA().iuia.ElementFromHandle(handle_or_elem)
_ctypes.COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None))
Unexpected error, recovered safely.
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 282, in frame_vars_to_xml
xml += var_to_xml(v, str(k), evaluate_full_value=eval_full_val)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 369, in var_to_xml
elif hasattr(v, "__len__") and not is_string(v):
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 379, in __getattribute__
ctrls = self.__resolve_control(self.criteria)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 250, in __resolve_control
ctrl = wait_until_passes(
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\timings.py", line 436, in wait_until_passes
func_val = func(*args, **kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 222, in __get_ctrl
ctrl = self.backend.generic_wrapper_class(findwindows.find_element(**ctrl_criteria))
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 84, in find_element
elements = find_elements(**kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 181, in find_elements
return [backend_obj.element_info_class(handle), ]
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\uia_element_info.py", line 71, in __init__
self._element = IUIA().iuia.ElementFromHandle(handle_or_elem)
_ctypes.COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None))
Unexpected error, recovered safely.
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 282, in frame_vars_to_xml
xml += var_to_xml(v, str(k), evaluate_full_value=eval_full_val)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 369, in var_to_xml
elif hasattr(v, "__len__") and not is_string(v):
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 379, in __getattribute__
ctrls = self.__resolve_control(self.criteria)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 250, in __resolve_control
ctrl = wait_until_passes(
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\timings.py", line 436, in wait_until_passes
func_val = func(*args, **kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 222, in __get_ctrl
ctrl = self.backend.generic_wrapper_class(findwindows.find_element(**ctrl_criteria))
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 84, in find_element
elements = find_elements(**kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 181, in find_elements
return [backend_obj.element_info_class(handle), ]
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\uia_element_info.py", line 71, in __init__
self._element = IUIA().iuia.ElementFromHandle(handle_or_elem)
_ctypes.COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None))
Unexpected error, recovered safely.
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 282, in frame_vars_to_xml
xml += var_to_xml(v, str(k), evaluate_full_value=eval_full_val)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 369, in var_to_xml
elif hasattr(v, "__len__") and not is_string(v):
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 379, in __getattribute__
ctrls = self.__resolve_control(self.criteria)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 250, in __resolve_control
ctrl = wait_until_passes(
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\timings.py", line 436, in wait_until_passes
func_val = func(*args, **kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 222, in __get_ctrl
ctrl = self.backend.generic_wrapper_class(findwindows.find_element(**ctrl_criteria))
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 84, in find_element
elements = find_elements(**kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 181, in find_elements
return [backend_obj.element_info_class(handle), ]
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\uia_element_info.py", line 71, in __init__
self._element = IUIA().iuia.ElementFromHandle(handle_or_elem)
_ctypes.COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None))
Unexpected error, recovered safely.
This also happens when just trying to access the value in the text box:
Save_As_File_Name_Box.get_value
<bound method EditWrapper.get_value of <uia_controls.EditWrapper - 'File name:', Edit, -4097925828434660645>>
Traceback (most recent call last):
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 250, in __resolve_control
ctrl = wait_until_passes(
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\timings.py", line 458, in wait_until_passes
raise err
pywinauto.timings.TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 282, in frame_vars_to_xml
xml += var_to_xml(v, str(k), evaluate_full_value=eval_full_val)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 369, in var_to_xml
elif hasattr(v, "__len__") and not is_string(v):
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 379, in __getattribute__
ctrls = self.__resolve_control(self.criteria)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 261, in __resolve_control
raise e.original_exception
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\timings.py", line 436, in wait_until_passes
func_val = func(*args, **kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 222, in __get_ctrl
ctrl = self.backend.generic_wrapper_class(findwindows.find_element(**ctrl_criteria))
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 87, in find_element
raise ElementNotFoundError(kwargs)
pywinauto.findwindows.ElementNotFoundError: {'best_match': 'vset_text', 'top_level_only': False, 'parent': <uia_element_info.UIAElementInfo - 'File name:', Edit, 19273026>, 'backend': 'uia'}
Unexpected error, recovered safely.
Then it persists and can't be recovered:
print("hi")
hi
Traceback (most recent call last):
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 250, in __resolve_control
ctrl = wait_until_passes(
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\timings.py", line 458, in wait_until_passes
raise err
pywinauto.timings.TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 282, in frame_vars_to_xml
xml += var_to_xml(v, str(k), evaluate_full_value=eval_full_val)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_xml.py", line 369, in var_to_xml
elif hasattr(v, "__len__") and not is_string(v):
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 379, in __getattribute__
ctrls = self.__resolve_control(self.criteria)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 261, in __resolve_control
raise e.original_exception
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\timings.py", line 436, in wait_until_passes
func_val = func(*args, **kwargs)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\application.py", line 222, in __get_ctrl
ctrl = self.backend.generic_wrapper_class(findwindows.find_element(**ctrl_criteria))
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\pywinauto\findwindows.py", line 87, in find_element
raise ElementNotFoundError(kwargs)
pywinauto.findwindows.ElementNotFoundError: {'best_match': 'vset_text', 'top_level_only': False, 'parent': <uia_element_info.UIAElementInfo - 'File name:', Edit, 19273026>, 'backend': 'uia'}
Unexpected error, recovered safely.
I think, the print("hi") error is not exactly related to the problem. You, probably, getting this error because your debugger tries to refresh the values of variables you trace or some other "live inspection" activity. Just look at your trace: 'pydevd_xml.py", line 282, in frame_vars_to_xml...'
@basicAuto , also, could you explain what kind of application you try to automate? Is it regular win32 or something else, like WPF or QT5?
@airelil
Thanks for the response, it is definitely WPF
I'm also getting same error while printing all the controls of the window using print_control_identifiers().
Can anyone help?
Most helpful comment
Alright. I have one workaround now.
Thanks for your help.