Sorry if this is off-topic, I was unable to find a user group for my
exact issue.

I'm using sorl thumbnail with Django.  On my local setup it works
fine, but in production the thumbnails are not made.

My code looks like this:

{% load thumbnail %}
{% thumbnail up.image "32x32" crop="center" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}">
{% empty %}
<img src="{{ MEDIA_URL }}/images/missing_small.png" alt="" title="" />
{% endthumbnail %}


I enabled logging and the trace looks like this:

Traceback (most recent call last):

 File 
"/usr/local/lib/python2.6/dist-packages/sorl_thumbnail-11.05.2-py2.6.egg/sorl/thumbnail/templatetags/thumbnail.py",
line 45, in render
   return self._render(context)

 File 
"/usr/local/lib/python2.6/dist-packages/sorl_thumbnail-11.05.2-py2.6.egg/sorl/thumbnail/templatetags/thumbnail.py",
line 97, in _render
   file_, geometry, **options

 File 
"/usr/local/lib/python2.6/dist-packages/sorl_thumbnail-11.05.2-py2.6.egg/sorl/thumbnail/base.py",
line 49, in get_thumbnail
   thumbnail)

 File 
"/usr/local/lib/python2.6/dist-packages/sorl_thumbnail-11.05.2-py2.6.egg/sorl/thumbnail/base.py",
line 74, in _create_thumbnail
   image = default.engine.create(source_image, geometry, options)

 File 
"/usr/local/lib/python2.6/dist-packages/sorl_thumbnail-11.05.2-py2.6.egg/sorl/thumbnail/engines/base.py",
line 14, in create
   image = self.colorspace(image, geometry, options)

 File 
"/usr/local/lib/python2.6/dist-packages/sorl_thumbnail-11.05.2-py2.6.egg/sorl/thumbnail/engines/base.py",
line 24, in colorspace
   return self._colorspace(image, colorspace)

 File 
"/usr/local/lib/python2.6/dist-packages/sorl_thumbnail-11.05.2-py2.6.egg/sorl/thumbnail/engines/pil_engine.py",
line 33, in _colorspace
   return image.convert('RGB')

 File "/usr/local/lib/python2.6/dist-packages/PIL/Image.py", line 679,
in convert
   self.load()

 File "/usr/local/lib/python2.6/dist-packages/PIL/ImageFile.py", line
215, in load
   raise_ioerror(e)

 File "/usr/local/lib/python2.6/dist-packages/PIL/ImageFile.py", line
52, in raise_ioerror
   raise IOError(message + " when reading image file")

IOError: broken data stream when reading image file


The error isn't very helpful since the file is there and is readable
by all.  I'm not sure how to get a more explicit error, or what to try
and fix.  Stuck.


Thanks,


-- 
Greg Donald
destiney.com | gregdonald.com

-- 
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.

Reply via email to