﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
11840	Form validation should check for IOErrors	Stavros Korokithakis	nobody	"Forms currently break on various types of images when PIL raises an IOError exception. This should be handled as a form error instead of crashing Django. A traceback is below:

      File ""main/views.py"", line 244, in ad_create_category
        if form.is_valid() and image_formset.is_valid():

      File ""lib/python2.6/site-packages/django/forms/formsets.py"", line 237, in is_valid
        if bool(self.errors[i]):

      File ""lib/python2.6/site-packages/django/forms/formsets.py"", line 211, in _get_errors
        self.full_clean()

      File ""lib/python2.6/site-packages/django/forms/formsets.py"", line 250, in full_clean
        self._errors.append(form.errors)

      File ""lib/python2.6/site-packages/django/forms/forms.py"", line 111, in _get_errors
        self.full_clean()

      File ""lib/python2.6/site-packages/django/forms/forms.py"", line 238, in full_clean
        value = field.clean(value, initial)

      File ""lib/python2.6/site-packages/django/forms/fields.py"", line 511, in clean
        trial_image.load()

      File ""lib/python2.6/site-packages/PIL/ImageFile.py"", line 155, in load
        self.load_prepare()

      File ""lib/python2.6/site-packages/PIL/PngImagePlugin.py"", line 337, in load_prepare
        raise IOError(""cannot read interlaced PNG files"")"		closed	Forms	1.1		worksforme			Unreviewed	0	0	1	0	0	0
