KeyError: 'bounds',bounds = elem.attrib["bounds"][1:-1].split("][")
作者: timeisgoing创建于 2025年1月7日更新于 2026年7月21日
[<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'内容来源: TencentQQGYLab/AppAgent