NREL / h5plexos

Convert PLEXOS solutions to HDF5 and query results from Python
Other
5 stars 1 forks source link

AttributeError when converting to h5 with Python 3.9 #11

Open mike-welch opened 3 years ago

mike-welch commented 3 years ago

I encountered an AttributeError on this line: https://github.com/NREL/h5plexos/blob/33dc07a6b1ffe47574ad5cf73c5243584508a15d/h5plexos/process/tempdb.py#L116

The Element.getchildren method was removed in Python 3.9, see: https://docs.python.org/3.8/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.getchildren

As the docs suggest, using list(elem) instead allows the code to run.


EDIT I later encountered an error in h5py so YMMV.