Skip to content

AttributeError when converting to h5 with Python 3.9 #11

@mike-welch

Description

@mike-welch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions