I am trying to use easy_thumbnails
in a Django (1.5)
project on my laptop (OSX Lion) using the local django development server (runserver
) or a python shell. I have the PIL
library installed with jpeg support and I am working in a virtual environment. I am testing the easy_thumbnail
app in a django shell with the following command:
th = get_thumbnailer(mymodel.image)
th.get_thumbnail(options)
These commands work fine on the server, the thumbnail is created successfully. However, in my local django shell and when using runserver the same command leads to the following error:
File "/.../site-packages/easy_thumbnails/files.py", line 397, in get_thumbnail
thumbnail = self.generate_thumbnail(thumbnail_options)
File "/.../site-packages/easy_thumbnails/files.py", line 293, in generate_thumbnail
"The source file does not appear to be an image")
InvalidImageFormatError: The source file does not appear to be an image
The Python Imaging library works well on my computer. In a normal (non-django) python shell, I can read, verify and write jpeg images.
I have tried many different ways of working around this problem, as I am aware that this could potentially be a problem of library pahts, as suggested in this question. I am out of ideas what I could try to solve this problem, any hints would be greatly appreciated.