On 12/05/2022 11:47, Charlie Clark wrote:
On 12 May 2022, at 11:26, Gilles wrote:
→ tree = et.parse(StringIO(content), parser)
Why StringIO? XML should always be bytes but there also shouldn't be a need to
convert what you've read from the file.
I don't know. I'm the newbie here.
I found it on the Net, and it solved the issue I had.
https://stackoverflow.com/questions/10457564/error-failed-to-load-external-entity-when-using-python-lxml
_______________________________________________
lxml - The Python XML Toolkit mailing list -- lxml@python.org
To unsubscribe send an email to lxml-le...@python.org
https://mail.python.org/mailman3/lists/lxml.python.org/
Member address: arch...@mail-archive.com