Urrlib2 IncompleteRead error

Nitin Pawar nitinpawar432 at gmail.com
Tue Jul 27 12:46:41 EDT 2010


import socket
# timeout in seconds
timeout = 10
socket.setdefaulttimeout(timeout)



On Tue, Jul 27, 2010 at 10:09 PM, Dirk Nachbar <dirknbr at gmail.com> wrote:

> Thanks, I don't think it's redirecting, how can I increase the timeout?
>
>
> On 27 July 2010 16:56, Nitin Pawar <nitinpawar432 at gmail.com> wrote:
>
>> Hi,
>>
>> Check if the webpage you are trying to access is redirecting the page to
>> some other page?
>> or the timeout is too less for the request to finish
>>
>>
>> Thanks,
>> Nitin
>>
>> On Tue, Jul 27, 2010 at 7:30 PM, dirknbr <dirknbr at gmail.com> wrote:
>>
>>> I am running urllib2.request and get this response when I do the read.
>>> Any ideas what causes this?
>>>
>>> return response.read()
>>>  File "C:\Python26\lib\socket.py", line 329, in read
>>>    data = self._sock.recv(rbufsize)
>>>  File "C:\Python26\lib\httplib.py", line 518, in read
>>>    return self._read_chunked(amt)
>>>  File "C:\Python26\lib\httplib.py", line 561, in _read_chunked
>>>    raise IncompleteRead(''.join(value))
>>> IncompleteRead: IncompleteRead(3235 bytes read)
>>>
>>> Dirk
>>> --
>>> http://mail.python.org/mailman/listinfo/python-list
>>>
>>
>>
>>
>> --
>> Nitin Pawar
>>
>>
>
>
> --
> http://twitter.com/dirknbr
> http://maximum-likely.blogspot.com
>
>


-- 
Nitin Pawar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100727/b590cef5/attachment-0001.html>


More information about the Python-list mailing list