Skip to content Skip to sidebar Skip to footer

Getting Invalid Image Error In Django, But Pil Is Installed And Passes All Tests

So I've finally successfully installed PIL (after many difficulties) on RHEL5 with Django (development version) and Python 2.6 installed at /opt/python2.6. Running selftest.py show

Solution 1:

See possible answer in:

Is it possible to control which libraries apache uses?

Referencing here so can still get bounty if awarded. :-)

Solution 2:

My impression of the PIL JPEG problem is that it's almost always a system configuration problem.

You built and configured PIL and tested with that version and it worked. So, my guess is that Django is pulling in a different PIL, probably one built without JPEG support or that can't find libjpeg.

You can confirm this by running your test again but using python -v manage.py shell instead of running python2.6 directly. You need to be careful here though and make sure your python executable and PYTHONPATH exactly match what is loaded by your web server.

Post a Comment for "Getting Invalid Image Error In Django, But Pil Is Installed And Passes All Tests"