KeyError: 'bounds' ,bounds = elem.attrib["bounds"][1:-1].split("][")
Author: timeisgoingCreated Jan 7, 2025Updated Jul 21, 2026
[<Element 'hierarchy' at 0x10d29eac0>, <Element 'node' at 0x10d29ed40>]
Traceback (most recent call last): File "/Users/tt/Downloads/AppAgent/scripts/step_recorder.py", line 95, in traverse_tree(xml_path, focusable_list, "focusable", True) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/tt/Downloads/AppAgent/scripts/and_controller.py", line 68, in traverse_tree parent_prefix = get_id_from_element(path[-2]) File "/Users/tt/Downloads/AppAgent/scripts/and_controller.py", line 42, in get_id_from_element bounds = elem.attrib["bounds"][1:-1].split("][") ~~~~~~~~~~~^^^^^^^^^^ KeyError: 'bounds'
另外我的用的本机的android studio,和这个有关系吗?
Source: TencentQQGYLab/AppAgent