FWIW, the Python 2.5 source code violates its own documentation if this is in some way meant to define a standard. That is, in zip and bz2 modules, they raise IOError's with only a string value and no errno.
Graham On Nov 4, 9:32 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > FWIW, it has been noted as an issue with mod_python that using IOError > directly isn't good, although for slightly other reasons. > > https://issues.apache.org/jira/browse/MODPYTHON-92 > > That it isn't using IOError correctly in as much as no errno is > present adds to why it shouldn't do as it is. It isn't just a simple > matter of supplying errno though as in certain situations there > wouldn't actually be any. > > As far as ignoring these errors, which occur when remote client closes > connection, it isn't necessarily a good idea for the lower level > layers to do so, as there are possible implications in doing so. For > example, it can hide problems in your own application and make it > harder to debug. A similar issue was brought up in relation to > mod_wsgi: > > http://code.google.com/p/modwsgi/issues/detail?id=29 > > Your observation about errno means that mod_wsgi should also change > what error exception type it is using as well. > > Graham > > On Nov 2, 8:31 pm, Bjørn Stabell <[EMAIL PROTECTED]> wrote: > > > On Oct 6, 11:20 pm, Trey <[EMAIL PROTECTED]> wrote: > > > > There are other people that have brought this up a little bit some > > > time ago. I run a small to medium sized web application that takes > > > profile pictures. By far my largest customer service issue is people > > > not being able to upload their photos. > > > > For the most part I have played it down as their connection sucking or > > > perhaps doing something stupid with the browser, but there are a > > > couple of things that I am running into that are causing an issue. > > > > 1. I can't replicate this, no matter what I do with my browser in the > > > middle of an upload. > > > 2. Judging by the django code near the problem, this is working on > > > information that has already been received. > > > 3. I get this a few times a day at least, different people every time. > > [...] > > > File "/usr/lib/python2.5/site-packages/django/core/handlers/ > > > modpython.py", line 120, in _get_raw_post_data > > > self._raw_post_data = self._req.read() > > > > IOError: Client read error (Timeout?) > > > We're seeing this too, on several Django sites. Annoyingly, as well, > > the IOError exception itself is broken; if you look at the docs, > > IOErrors (which are a form of EnvironmentErrors) should have a two- or > > three-tuple .args, one of which would be the errno, but the ones > > thrown bymod_python/Django seems to have only one item in the tuple; > > the string you see above. > > > It's particularly annoying since we'd like to treat this as an info/ > > debug-level error, not an error-level error, and we could if we just > > had access to the errno. (We're trying to silence non-errors so we > > can do proper monitoring.) > > > Rgds, > > Bjorn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---