Skip to content

UDF handling broken for Python 3.9+ by xml.etree API change #239

@elgow

Description

@elgow

The getchildren() method has been removed from xml.etree from python 3.9 (https://docs.python.org/3.8/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.getchildren)
resulting in the error

File ".../lib/python3.10/site-packages/genologics/descriptors.py", line 200, in _update_elems
for elem in self.rootnode.getchildren():
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren'

Seems to be an easy fix as getchildren() is used in only two places

/Users/egow/.pyenv/versions/3.10.9/envs/LIMS-15796/lib/python3.10/site-packages/genologics
descriptors.py
for node2 in node.getchildren():
for elem in self.rootnode.getchildren():

PR to follow

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