![](https://secure.gravatar.com/avatar/8b97b5aad24c30e4a1357b38cc39aeaa.jpg?s=120&d=mm&r=g)
17 Mar
2008
17 Mar
'08
4:20 p.m.
Hi, René 'Necoro' Neumann wrote:
I attached a patch that also works for me and (again) seems to work around the symptom you see.
This patch only works for me when passing a filename or file to parse(). When passing a StringIO instance it still hangs.
True, didn't realise that in my tests. Here is another patch that seems to work better for me (still no idea why).
What about the way simpler patch: Add the following lines somewhere, where they fit:
if base_url is None: base_url = ""
Because passing an empty base_url works too. Or does this have side-effects?
Yes. The URL is used to identify the document in a couple of places, and the base_url parameter is just a way to override the URL in cases where lxml can't determine it itself. Stefan