hang in urllib.read()?
joonas at olen.to
Mon Mar 25 09:18:52 CET 2002
Nick Arnett wrote:
> The (presumably) infinite loop that I thought was in sgmllib, about which I
> posted earlier, actually seems to be when I call read() on an urllib.urlopen
> object. It's terribly non-reproducible, though -- I'm retrieving lots of
> pages and sometimes it'll go for dozens and dozens, no problem. Other time
> it hangs after just a few. And it won't do it on the same page twice, as
> far as I can see.
> I've been unable to find anything like this searching... sound familiar to
> anyone, or any suggestions for nailing it down, short of gruesome stepping
> through with a debugger, hoping I can catch one...?
> This is on Win2000 with Python 2.2. Haven't tried on other platforms yet.
Your problem is propably the quite long timeout of urlopen.
Search Google Groups for "urllib timeout" or take a look at
More information about the Python-list