freebsd Python27,mod_wsgi, Django, easy_thumbnails error: InvalidImageFormatError: The source file does not appear to be an image

StackOverflow https://stackoverflow.com/questions/19990295

Question

i want to make this work on freebsd

I am always receiving this error when trying to generate a thumbnail with the easy_thumbnails module:

InvalidImageFormatError: The source file does not appear to be an image

  • I have tried installing PIL from source by specifying the library paths in the setup.py file
  • I have tried installing PILLOW instead.

  • I tried it both on python27 and python26

  • I tried installing PIL with easy install instead of pip, both on PILLOW and PIL

  • I have py-imaging installed and my tests on the PIL library show ok

btw the exact python code works fine on a RHEL box

any other suggestions for things to try here

thank you in advance

Was it helpful?

Solution

That's usually a sign that PIL is not finding the libraries for the image type. You mentioned that you installed from source with the library paths specified. Did you include all the libraries? Do you have the JPEG port installed? Did you try installing PIL from ports. The port defaults to include JPEG, ZLIB, Freetype2, etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top