Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urllib2 httplib _read_chunked timeout #43800

Closed
devloop mannequin opened this issue Aug 9, 2006 · 4 comments
Closed

urllib2 httplib _read_chunked timeout #43800

devloop mannequin opened this issue Aug 9, 2006 · 4 comments
Assignees
Labels
docs Documentation in the Doc dir stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@devloop
Copy link
Mannequin

devloop mannequin commented Aug 9, 2006

BPO 1537445
Nosy @birkenfeld, @orsenthil, @devdanzin

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2009-02-13.10:53:45.102>
created_at = <Date 2006-08-09.15:00:08.000>
labels = ['type-bug', 'library', 'docs']
title = 'urllib2 httplib _read_chunked timeout'
updated_at = <Date 2009-02-13.10:53:45.100>
user = 'https://bugs.python.org/devloop'

bugs.python.org fields:

activity = <Date 2009-02-13.10:53:45.100>
actor = 'georg.brandl'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2009-02-13.10:53:45.102>
closer = 'georg.brandl'
components = ['Documentation', 'Library (Lib)']
creation = <Date 2006-08-09.15:00:08.000>
creator = 'devloop'
dependencies = []
files = []
hgrepos = []
issue_num = 1537445
keywords = []
message_count = 4.0
messages = ['60967', '76748', '81784', '81905']
nosy_count = 5.0
nosy_names = ['georg.brandl', 'jjlee', 'orsenthil', 'ajaksu2', 'devloop']
pr_nums = []
priority = 'normal'
resolution = 'works for me'
stage = 'test needed'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue1537445'
versions = ['Python 2.6']

@devloop
Copy link
Mannequin Author

devloop mannequin commented Aug 9, 2006

Hello !

In a code of mine if have the lines :
try:
req = urllib2.Request(url)
u = urllib2.urlopen(req)
data=u.read()
except urllib2.URLError,err:
// error handling here

The urllib2.URLError normally catchs the
socket.timeout but someone send me a bug report of a
tiemout error :

File "/usr/lib/python2.4/socket.py", line 285, in read
data = self._sock.recv(recv_size)
File "/usr/lib/python2.4/httplib.py", line 460, in read
return self._read_chunked(amt)
File "/usr/lib/python2.4/httplib.py", line 495, in
_read_chunked
line = self.fp.readline()
File "/usr/lib/python2.4/socket.py", line 325, in
readline
data = recv(1)
socket.timeout: timed out

Is it a bug with httplib and 'Content-Encoding:
chunked' header ?

@jjlee
Copy link
Mannequin

jjlee mannequin commented Dec 2, 2008

urlopen() raises URLError, .read() may raise other errors. I don't
think that's a bug in itself, though no doubt:

  1. The documentation of exceptions raised could and should be improved
  2. The exceptions that can be raised are likely still inconsistent
    (though this has improved in Python 2.6, I think)

Recommend closing this bug.

Please open other bugs about the issues above if you have patches.

@devdanzin
Copy link
Mannequin

devdanzin mannequin commented Feb 12, 2009

Should this one be closed and docs discussed in a new one? Volunteers? :)

@devdanzin devdanzin mannequin added docs Documentation in the Doc dir stdlib Python modules in the Lib dir labels Feb 12, 2009
@devdanzin devdanzin mannequin assigned birkenfeld Feb 12, 2009
@devdanzin devdanzin mannequin added type-bug An unexpected behavior, bug, or error docs Documentation in the Doc dir stdlib Python modules in the Lib dir labels Feb 12, 2009
@devdanzin devdanzin mannequin assigned birkenfeld Feb 12, 2009
@devdanzin devdanzin mannequin added the type-bug An unexpected behavior, bug, or error label Feb 12, 2009
@birkenfeld
Copy link
Member

I agree.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant