Django-oscar: IOError "decoder jpeg not available" when accessing the product category

Created on 9 Oct 2013  路  4Comments  路  Source: django-oscar/django-oscar

I am using Ubuntu 13.04 and installed the Django Oscar Commerce.

IOError at /catalogue/

decoder jpeg not available

Request Method: GET
Request URL: http://localhost:8000/catalogue/
Django Version: 1.5.4
Exception Type: IOError
Exception Value:

decoder jpeg not available

Exception Location: /home/v512/Documents/django-oscar/oscar/local/lib/python2.7/site-packages/Pillow-1.7.8-py2.7-linux-i686.egg/PIL/Image.py in _getdecoder, line 383
Python Executable: /home/v512/Documents/django-oscar/oscar/bin/python
Python Version: 2.7.4
Python Path:

['/home/v512/Documents/django-oscar/sites/sandbox',
'/home/v512/Documents/django-oscar',
'/home/v512/Documents/django-oscar/oscar/local/lib/python2.7/site-packages/Unidecode-0.04.14-py2.7.egg',
'/home/v512/Documents/django-oscar/oscar/local/lib/python2.7/site-packages/django_compressor-1.3-py2.7.egg',
'/home/v512/Documents/django-oscar/oscar/local/lib/python2.7/site-packages/Babel-0.9.6-py2.7.egg',
'/home/v512/Documents/django-oscar/oscar/local/lib/python2.7/site-packages/python_memcached-1.51-py2.7.egg',
'/home/v512/Documents/django-oscar/oscar/local/lib/python2.7/site-packages/sorl_thumbnail-11.12-py2.7.egg',
'/home/v512/Documents/django-oscar/oscar/local/lib/python2.7/site-packages/django_treebeard-2.0b1-py2.7.egg',
'/home/v512/Documents/django-oscar/oscar/local/lib/python2.7/site-packages/django_haystack-2.0.0_beta-py2.7.egg',
'/home/v512/Documents/django-oscar/oscar/local/lib/python2.7/site-packages/django_extra_views-0.5.5-py2.7.egg',
'/home/v512/Documents/django-oscar/oscar/local/lib/python2.7/site-packages/South-0.7.6-py2.7.egg',
'/home/v512/Documents/django-oscar/oscar/local/lib/python2.7/site-packages/Pillow-1.7.8-py2.7-linux-i686.egg',
'/home/v512/Documents/django-oscar/oscar/local/lib/python2.7/site-packages/django_appconf-0.6-py2.7.egg',
'/home/v512/Documents/django-oscar/oscar/lib/python2.7',
'/home/v512/Documents/django-oscar/oscar/lib/python2.7/plat-i386-linux-gnu',
'/home/v512/Documents/django-oscar/oscar/lib/python2.7/lib-tk',
'/home/v512/Documents/django-oscar/oscar/lib/python2.7/lib-old',
'/home/v512/Documents/django-oscar/oscar/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-i386-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/home/v512/Documents/django-oscar/oscar/local/lib/python2.7/site-packages']

Most helpful comment

You're missing JPEG support in Pillow. Read documentation or @codeinthehole's guide.

Following commands should solve your problem:

pip uninstall pillow
sudo apt-get install python-dev libjpeg-dev libfreetype6-dev zlib1g-dev
pip install pillow

All 4 comments

You're missing JPEG support in Pillow. Read documentation or @codeinthehole's guide.

Following commands should solve your problem:

pip uninstall pillow
sudo apt-get install python-dev libjpeg-dev libfreetype6-dev zlib1g-dev
pip install pillow

Thanks a lot its working

Hi,
I encounterd same problems under CentOS 6.4 with virtual env.
Even though installed PIL, pillow , the problem still exists.
Do you guys know how to solve it ?
Thanks.

I don't think anyone here has experience with CentOS. I'm afraid you'll have to find out for yourself how to compile Pillow with libjpeg under CentOS.
1 looks helpful, and it's definitely supported

Was this page helpful?
0 / 5 - 0 ratings