### Description For Python 3.9 and up, the `getchildren()` method is removed. See https://docs.python.org/3.8/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.getchildren This will cause an error with message `'xml.etree.ElementTree.Element' object has no attribute 'getchildren'`. ### Environment Information - Environment: Python 3.10 ### Stack Trace `'xml.etree.ElementTree.Element' object has no attribute 'getchildren'` ### Sample Code Snippet ``` if element.tag == search_name: element_children = element.getchildren() # instead use if element.tag == search_name: element_children = list(element) ``` ### Suggested Fix Replace all occurrences of this method (`getchildren()`) with `list()` as stated in the documentation linked above.
Description
For Python 3.9 and up, the
getchildren()method is removed. See https://docs.python.org/3.8/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.getchildrenThis will cause an error with message
'xml.etree.ElementTree.Element' object has no attribute 'getchildren'.Environment Information
Stack Trace
'xml.etree.ElementTree.Element' object has no attribute 'getchildren'Sample Code Snippet
Suggested Fix
Replace all occurrences of this method (
getchildren()) withlist()as stated in the documentation linked above.