[lxml-dev] reloading a network resource fails
Stefan Behnel
stefan_ml at behnel.de
Fri Jul 27 09:54:04 CEST 2007
Hi,
jholg at gmx.de wrote:
> parsing a network resource multiple times fails in current trunk:
>
> *** 2.0.dev-45372 ***
>>>> etree.parse("http://adevp01:8080/validSummary-1.2.xml")
> <etree._ElementTree object at 0x2e4850>
>>>> etree.parse("http://adevp01:8080/validSummary-1.2.xml")
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "etree.pyx", line 2065, in etree.parse
> File "parser.pxi", line 1004, in etree._parseDocument
> File "parser.pxi", line 1008, in etree._parseDocumentFromURL
> File "parser.pxi", line 925, in etree._parseDocFromFile
> File "parser.pxi", line 585, in etree._BaseParser._parseDocFromFile
> File "parser.pxi", line 682, in etree._handleParseResult
> File "parser.pxi", line 630, in etree._raiseParseError
> etree.XMLSyntaxError: Attempt to load network entity http://adevp01:8080/validSummary-1.2.xml
Funny. This actually changed in the trunk, as lxml 2.0 will no longer read
network resources by default (pass False for the "no_network" kw arg of the
parser if you want to enable it).
However, it should also fail the first time you do it. I'll have to see where
the problem is (libxml2 or lxml).
> I also reported this one on the new launchpad bugtracker. Can this be set
> up to let one choose the version, or should we introduce a convention on
> naming the summary line, e.g. [trunk], [1.3]?
I'm also missing such an option. Looks like I should dig a little more.
Stefan
More information about the lxml-dev
mailing list