Opened 16 years ago

Last modified 13 years ago

#11149 closed

error with def save_form_data -- — at Version 5

Reported by: Roman Kalinichenko Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Karen Tracey)

Hi everyone

I use django revision 10000 and it is normal. But when I update to revision more then 10200 that I get error:

cannot identify image fileRequest Method:	POST
Request URL:	http://127.0.0.1:8000/users/a1/
Exception Type:	IOError
Exception Value:	cannot identify image file
Exception Location:	/usr/lib/python2.5/site-packages/PIL/Image.py in open, line 1917
Python Executable:	/usr/bin/python2.5
Python Version:	2.5.4

My code where is problem is:

class ThumbnailImageField(models.ImageField):
    def save_form_data(self, instance, data):
        if data and isinstance(data, UploadedFile):
            im = Image.open(data).convert("RGB")

if I change data to constant path that it will be work without error

Change History (6)

comment:1 by dc, 16 years ago

Looks like #11055 duplicate. Does trunk head also has this error? And please post full traceback.

comment:2 by Roman Kalinichenko, 16 years ago

My ticket not alike #11055 because in #11055 about admin but my ticket work without admin

comment:3 by dc, 16 years ago

#11055 is not about admin, but about upload file rewinding (without it PIL can not recognize image). Please checkout curent trunk head (use svn co, not svn up) and post full traceback if you can confirm error.

by Roman Kalinichenko, 16 years ago

Attachment: trackback.txt added

comment:4 by Roman Kalinichenko, 16 years ago

I make use svn co and get version beta 1 SVN-10825
but problem not disapears. So if i back to version to 10189 it work there.
I attach file with TrackBack :

comment:5 by Karen Tracey, 16 years ago

Description: modified (diff)

Fixed formatting.

Note: See TracTickets for help on using tickets.
Back to Top