This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author f.de.kruijf
Recipients f.de.kruijf, serhiy.storchaka
Date 2020-09-11.12:13:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <3441773.HjUo2NBRHr@eiktum>
In-reply-to <1599816689.76.0.0648059287124.issue41759@roundup.psfhosted.org>
Content
Op vrijdag 11 september 2020 11:31:29 CEST schreef u:
> Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment:
> 
> parse() is an instance method. It should be called as tree.parse(f) (where
> tree is an instance of ElementTree), not ElementTree.parse(f).
> 
> ----------
I have no idea how to make tree an instance.
Reading the documentation,
https://docs.python.org/2/library/xml.etree.elementtree.html,
it shows as an example:

import xml.etree.ElementTree as ET
tree = ET.parse('country_data.xml')

which is exactly what the program looks like and what my small python script 
does without an error.

-- 
fr.gr.

Freek de Kruijf
History
Date User Action Args
2020-09-11 12:13:42f.de.kruijfsetrecipients: + f.de.kruijf
2020-09-11 12:13:42f.de.kruijflinkissue41759 messages
2020-09-11 12:13:42f.de.kruijfcreate