Re: Image Field Issue
Thanks Kurtis, I figured out that was the issue. I downloaded a copy of PIL from their official site. Installed the devel libraries for libjpeg and then did a setup.py install and now its fixed :) Regards, Swaroop Shankar V On Mon, Oct 24, 2011 at 11:32 AM, Kurtis Mullins wrote: > Django relies on Python Imagine Library to check if an image is valid or > not. Make sure that PIL was compiled w/ the libjpeg. I'm not sure on exact > directions on how to do that, but you can find them available online. When > you compile PIL, it will tell you what extensions are supported or missing > due to dependencies. Good luck! > > On Mon, Oct 24, 2011 at 1:33 AM, Swaroop Shankar V wrote: > >> Hello All, >> An update to my previous question. The error occurs only if I try to >> upload jpeg images, other formats like gif, png do not have this issue. >> Please let me know if there is any extension that i need to install to >> support jpeg. Please note that mine is a linux machine (Opensuse 11.3). >> Thanks >> >> Regards, >> >> Swaroop Shankar V >> >> >> >> >> On Mon, Oct 24, 2011 at 7:07 AM, Swaroop Shankar V >> wrote: >> >>> Hello All, >>> >>> I am having a trough time with the Image Field. I am trying to upload an >>> image and even if i upload a valid image, the form validator throws an error >>> "Upload a valid image. The file you uploaded was either not an image or a >>> corrupted image.". I have verified that PIL is installed in my system, even >>> then its showing this validation error. I have not done any processing as >>> such. In my models.py i have the following statement: >>> avatar = >>> models.ImageField(_('Avatar'),upload_to=settings.IMAGE_UPLOAD_PATH, >>> null=True) >>> >>> where IMAGE_UPLOAD_PATH is set to 'uploads/images' which i guess should >>> be in my MEDIA_URL. Then in my forms.py i have the following statment: >>> avatar = forms.ImageField(label=_('Avatar')) >>> >>> I am not sure if i have done something wrong. Please guide me. Thanks >>> >>> Regards, >>> >>> Swaroop Shankar V >>> >>> >> -- >> 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 >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > -- > 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 > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Image Field Issue
Django relies on Python Imagine Library to check if an image is valid or not. Make sure that PIL was compiled w/ the libjpeg. I'm not sure on exact directions on how to do that, but you can find them available online. When you compile PIL, it will tell you what extensions are supported or missing due to dependencies. Good luck! On Mon, Oct 24, 2011 at 1:33 AM, Swaroop Shankar V wrote: > Hello All, > An update to my previous question. The error occurs only if I try to upload > jpeg images, other formats like gif, png do not have this issue. Please let > me know if there is any extension that i need to install to support jpeg. > Please note that mine is a linux machine (Opensuse 11.3). Thanks > > Regards, > > Swaroop Shankar V > > > > > On Mon, Oct 24, 2011 at 7:07 AM, Swaroop Shankar V wrote: > >> Hello All, >> >> I am having a trough time with the Image Field. I am trying to upload an >> image and even if i upload a valid image, the form validator throws an error >> "Upload a valid image. The file you uploaded was either not an image or a >> corrupted image.". I have verified that PIL is installed in my system, even >> then its showing this validation error. I have not done any processing as >> such. In my models.py i have the following statement: >> avatar = >> models.ImageField(_('Avatar'),upload_to=settings.IMAGE_UPLOAD_PATH, >> null=True) >> >> where IMAGE_UPLOAD_PATH is set to 'uploads/images' which i guess should be >> in my MEDIA_URL. Then in my forms.py i have the following statment: >> avatar = forms.ImageField(label=_('Avatar')) >> >> I am not sure if i have done something wrong. Please guide me. Thanks >> >> Regards, >> >> Swaroop Shankar V >> >> > -- > 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 > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Image Field Issue
Hello All, An update to my previous question. The error occurs only if I try to upload jpeg images, other formats like gif, png do not have this issue. Please let me know if there is any extension that i need to install to support jpeg. Please note that mine is a linux machine (Opensuse 11.3). Thanks Regards, Swaroop Shankar V On Mon, Oct 24, 2011 at 7:07 AM, Swaroop Shankar V wrote: > Hello All, > > I am having a trough time with the Image Field. I am trying to upload an > image and even if i upload a valid image, the form validator throws an error > "Upload a valid image. The file you uploaded was either not an image or a > corrupted image.". I have verified that PIL is installed in my system, even > then its showing this validation error. I have not done any processing as > such. In my models.py i have the following statement: > avatar = > models.ImageField(_('Avatar'),upload_to=settings.IMAGE_UPLOAD_PATH, > null=True) > > where IMAGE_UPLOAD_PATH is set to 'uploads/images' which i guess should be > in my MEDIA_URL. Then in my forms.py i have the following statment: > avatar = forms.ImageField(label=_('Avatar')) > > I am not sure if i have done something wrong. Please guide me. Thanks > > Regards, > > Swaroop Shankar V > > -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Image Field Issue
Hello All, I am having a trough time with the Image Field. I am trying to upload an image and even if i upload a valid image, the form validator throws an error "Upload a valid image. The file you uploaded was either not an image or a corrupted image.". I have verified that PIL is installed in my system, even then its showing this validation error. I have not done any processing as such. In my models.py i have the following statement: avatar = models.ImageField(_('Avatar'),upload_to=settings.IMAGE_UPLOAD_PATH, null=True) where IMAGE_UPLOAD_PATH is set to 'uploads/images' which i guess should be in my MEDIA_URL. Then in my forms.py i have the following statment: avatar = forms.ImageField(label=_('Avatar')) I am not sure if i have done something wrong. Please guide me. Thanks Regards, Swaroop Shankar V -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.