A problem while using urllib
Steve Holden
steve at holdenweb.com
Fri Oct 14 00:15:04 EDT 2005
John J. Lee wrote:
> Steve Holden <steve at holdenweb.com> writes:
> [...]
>
>> File "/usr/lib/python2.4/urllib2.py", line 996, in do_open
>> raise URLError(err)
>>urllib2.URLError: <urlopen error (120, 'Operation already in progress')>
>>
>>Looking at that part of the course of urrllib2 we see:
>>
>> headers["Connection"] = "close"
>> try:
>> h.request(req.get_method(), req.get_selector(), req.data,
>>headers)
>> r = h.getresponse()
>> except socket.error, err: # XXX what error?
>> raise URLError(err)
>>
>>So my conclusion is that there's something in the Cygwin socket module
>>that causes problems not seen under other platforms.
>>
>>I couldn't find any obviously-related error in the Python bug tracker,
>>and I have copied this message to the Cygwin list in case someone there
>>knows what the problem is.
>
> [...]
>
> I don't *think* this is related, but just in case:
>
> http://python.org/sf/1208304
>
Good catch, John, I suspect this is a possibility so I've added the
following note:
"""The Windows 2.4.1 build doesn't show this error, but the Cygwin 2.4.1
build does still have uncollectable objects after a urllib2.urlopen(),
so there may be a platform dependency here. No 2.4.2 on Cygwin yet, so
nothing conclusive as lsof isn't available."""
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
More information about the Python-list
mailing list