rice-solar-physics/ebtelPlusPlus

xml.etree.ElementTree.Element getchildren deprecated in python 3.9

Closed this issue · 1 comments

This may only apply to the examples, but the error (and a failure to run) is raised:

AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren'

when running the examples with python >3.9. This call occurs on line 96 and 105 of util.py. This is easily avoided by downgrading to python 3.8 (verified).

For future compliance, it looks like the call needs to swap to a list(elem) or similar.

Thanks Will!

Sorry for such a delayed response here and thanks for pointing this out. I knew my hacked-together XML parser would one day start to fall apart! It is pretty annoying that this change in behavior happens between minor Python releases. I will try to get a fix in for this soon, especially since Python 3.10 is already out!