hang in urllib.read()?

Daniel Ortmann dortmann at lsil.com
Tue Mar 26 15:46:01 EST 2002


"Nick Arnett" <narnett at mccmedia.com> writes:

> 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.

Hello,

Could this information help?

The web page, "Known bugs in Python 2.2", says:

    "The ftplib module's FTP class was supposed to default to paassive
    mode.  Unfortunately it doesn't.  This means that urllib.urlopen()
    doesn't work from inside most firewalls.  If you have this problem,
    delete or comment out line 117, 'self.passiveserver = 0', from file
    ftplib.py".

-- 
Daniel Ortmann, LSI Logic
3425 40th Av NW, Suite 200, Rochester, MN 55901
dortmann at lsil.com / 507.535.3861 (w) / 6-3861 (int)
ortmann at isl.net   / 507.288.7732 (h)



More information about the Python-list mailing list