[lxml-dev] resolvers
Steven Vereecken
steven.vereecken at gmail.com
Mon Sep 15 23:43:50 CEST 2008
Hi,
I 've got a couple of strange things with custom resolvers:
1) I can't get the resolve_file method to work, not with actual file
objects, and not with StringIO either. I always get the following
message:
Exception exceptions.TypeError: 'function takes exactly 4 arguments (3
given)' in 'lxml.etree._local_resolver' ignored
As it says, this is ignored, but I get lxml.etree.XMLSyntaxError: None later on.
This is with lxml 2.1.1 (on Windows XP) . I've also tried an older
version (1.3.6) that was installed on my Ubuntu box, and that worked,
however, after building 2.1.2 there, I get the same problem.
I'm not sure whether this is an actual bug, or whether something has
changed that is not clear from the docs.
2) resolve_string seems only to work for unicode strings and
ASCII-only bytestrings. I would expect behaviour more consistent with
etree.fromstring, so I'd assume this is a bug too?
If you can confirm these are bugs, I'll file them in the tracker.
greetings,
Steven
More information about the lxml-dev
mailing list