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.21:09:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <3021586.cYln7Jv3Xv@eiktum>
In-reply-to <1599836803.49.0.593828544987.issue41759@roundup.psfhosted.org>
Content
Op vrijdag 11 september 2020 17:06:43 CEST schreef u:
> Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment:
> 
> It was not clear what you do without code and full traceback.
> 
> The example uses *function* parse() from *module* ElementTree. Your code
> seems uses *method* parse() of *class* ElementTree.
> 
> https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.Eleme
> ntTree.parse
> https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.Elem
> entTree.ElementTree.parse

I have very little knowledge about class, instance and the other specific 
terms used in Python.

I just try to use a Python script, I found and need, and ran into this 
problem. What it does looks simple to me. As simple as the 3 line script I 
showed, which works.
Why does the larger script give this confusing error about a missing argument, 
which is present? It is a file name or file object as it should.
What I understand is that tree becomes an instance. Of what?

Is the problem caused by using ElementTree in "import xml.etree.ElementTree as 
ElementTree". Should I use "import xml.etree.ElementTree as ET" and "tree = 
ET.parse(f)"?

-- 
fr.gr.

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