Freek de Kruijf <f.de.kru...@gmail.com> added the comment:

Op vrijdag 11 september 2020 17:06:43 CEST schreef u:
> Serhiy Storchaka <storchaka+cpyt...@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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41759>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to