Re: sorl thumbnail
Is your cache, readable and writable to other groups/users as well?
On 6/11/2011 1:11 AM, Greg Donald wrote:
> On Fri, Jun 10, 2011 at 11:59 AM, Greg Donald <gdonald@gmail.com> wrote:
>> 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
>
>
> And then more baffling is the fact that it works using `manage.py shell`
>
>
> In [1]: from sorl.thumbnail import get_thumbnail
>
> In [2]: im = get_thumbnail('/myproject/static/images/user_profiles/1/11-20-2010-2_5.jpg',
> '32x32', crop='center' )
>
> In [3]: im
> Out[3]: <sorl.thumbnail.images.ImageFile object at 0x29fe090>
>
> In [4]: im.url
> Out[4]: 'http://example.com/cache/ff/31/ff318b4a995ff345d1d48e79b67ec62b.jpg'
>
> It made the thumbnail, just won't make one via the template code.
>
>
>
--
Your eyes are weary from staring at the CRT. You feel sleepy. Notice
how restful it is to watch the cursor blink. Close your eyes. The
opinions stated above are yours. You cannot imagine why you ever felt
otherwise.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home