Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python 3.9: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren' #14

Open
taserflanger opened this issue Mar 29, 2021 · 1 comment

Comments

@taserflanger
Copy link

as described here, in python 3.9 the method xml.etree.ElementTree.Element.getchildren does not work anymore, and throws an error when running module-run.py with python 3.9 with default parameters (only -dev=-1 for cpu)

pyScoreParser/musicxml_parser/mxp/notations.py", line 55, in parse_notations
    notations = self.xml_notations.getchildren()
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren'
@eoinroe
Copy link

eoinroe commented Apr 18, 2024

You have to change to code from notations = self.xml_notations.getchildren() to notations = list(self.xml_notations) in order for it to work.

You also have to change child_list = direction.find('direction-type').getchildren() to child_list = list(direction.find('direction-type')) in direction.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants