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
; > 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
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
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
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
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
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
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
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
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
>
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()
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
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
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
14 matches
Mail list logo