Re: PIL & imagefield validation

2009-08-19 Thread zayatzz
OK. Apparently this is not PIL problem. I replaced validation errormessage with custom messages for debugging and i found out that imagefield validation fails here : try: # load() is the only method that can spot a truncated JPEG, # but it cannot be called

Re: PIL & imagefield validation

2009-08-19 Thread zayatzz
; > But when uploading imagefield in form i  get validationerror: > > Upload a valid image. The file you uploaded was either not an image or > > a corrupted image. > > > Searchmonkey shows that it comes from field.py imagefield validation. > > before raising this erro

Re: PIL & imagefield validation

2009-08-18 Thread Malcolm MacKinnon
ut when uploading imagefield in form i get validationerror: > Upload a valid image. The file you uploaded was either not an image or > a corrupted image. > > Searchmonkey shows that it comes from field.py imagefield validation. > before raising this error it imports Image from PIL, open

Re: PIL & imagefield validation

2009-08-18 Thread Michael
On Tue, Aug 18, 2009 at 4:44 PM, zayatzz wrote: > > Buh... well instructions for installing & compiling ship with the > software. Can you tell me how to uninstall those modules? > Not a clue. You can start in site-packages or go into the shell and type import PIL

Re: PIL & imagefield validation

2009-08-18 Thread zayatzz
gi instead of mod_python. > > > > But when uploading imagefield in form i  get validationerror: > > > Upload a valid image. The file you uploaded was either not an image or > > > a corrupted image. > > > > Searchmonkey shows that it comes from field.py

Re: PIL & imagefield validation

2009-08-18 Thread Michael
L. I also started > > using mod_wsgi instead of mod_python. > > > > But when uploading imagefield in form i get validationerror: > > Upload a valid image. The file you uploaded was either not an image or > > a corrupted image. > > > > Searchmonkey shows

Re: PIL & imagefield validation

2009-08-18 Thread zayatzz
Upload a valid image. The file you uploaded was either not an image or > a corrupted image. > > Searchmonkey shows that it comes from field.py imagefield validation. > before raising this error it imports Image from PIL, opens file and > verfies it. I tried importing PIL from python pro

PIL & imagefield validation

2009-08-17 Thread zayatzz
rted using mod_wsgi instead of mod_python. But when uploading imagefield in form i get validationerror: Upload a valid image. The file you uploaded was either not an image or a corrupted image. Searchmonkey shows that it comes from field.py imagefield validation. before raising this error it imp

Re: ImageField validation

2008-08-22 Thread Michael Sanders
On Aug 22, 3:38 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > You should really be using forms here, even though you're not > submitting them through the normal channels. This would allow you to > use form-level validations, which are designed precisely for these > types of situations. Just

Re: ImageField validation

2008-08-22 Thread Marty Alchin
On Fri, Aug 22, 2008 at 10:22 AM, Michael Sanders <[EMAIL PROTECTED]> wrote: > Is this a consequence of http://code.djangoproject.com/changeset/8348 > or should I be doing something else to enable this validation? (I have > PIL installed). Would it be preferable to use a Django form for the >

ImageField validation

2008-08-22 Thread Michael Sanders
Using Django svn r8463 I have the following model: class Image(models.Model): description = models.CharField(max_length=100) image = models.ImageField(upload_to='images') ...and view: def upload_image(request): upFile = request.FILES['file'] newImage = Image()

Re: ImageField Validation Error

2007-11-15 Thread Arnold Chen
I faced this problem as well, but there is a work around. I am using django 0.97 pre (i downloaded from svn 16th Nov, 2007) Go to c:/python2.4/lib/site-packages/django/core/validators.py or /usr/lib/python2.4/site-packages/django/core/validators.py , if you are using Fedora comment the

Re: ImageField Validation Error

2007-11-12 Thread drackett
I'm running into this exact same issue. Very few images I try are "valid" even though I can work with them in PIL by hand. On Nov 4, 1:27 pm, Matt <[EMAIL PROTECTED]> wrote: > I've got a model with an ImageField. But, when I attempt to add an > image via the Admin interface, I receive the error

ImageField Validation Error

2007-11-04 Thread Matt
I've got a model with an ImageField. But, when I attempt to add an image via the Admin interface, I receive the error message: "Upload a valid image. The file you uploaded was either not an image or a corrupted image." I'm pretty sure that all of my paths are set correctly because I can change