[MAKE THUMBNAIL] error

55 views
Skip to first unread message

nostradamnit

unread,
Sep 11, 2008, 10:13:58 AM9/11/08
to Satchmo users
Hi all,

I'm having a hell of a time getting the product thumbnail generation
to work. I have PIL installed, as well as libjpeg. After a couple of
frustrating hours, I finally got PIL autotest.py to pass all the tests
(thanks to 'python setup.py build_ext -i' from
http://www.igorsobreira.com/pil-ioerror-decoder-jpeg-not-available/ ).
However, this does NOT seem to have fixed anything with Satchmo. I
still get the console error (sometimes) saying:

[MAKE THUMBNAIL] error decoder jpeg not available for file u'/static/
images/productimage-picture-default.jpg'

and the admin interface error saying:

Upload a valid image. The file you uploaded was either not an image or
a corrupted image.

Could someone kindly point me in the right direction, as my head is
seriously starting to hurt ;(

Thanks,
Sam

Günter Walser

unread,
Sep 11, 2008, 10:20:19 AM9/11/08
to satchm...@googlegroups.com
Might have something to to with the file you are using, I see in your
erormessage:

u'/static/ images/productimage-picture-default.jpg'

and the space looks strange to me. It tries maybe to encode two files, both
not available.

rgds
g

nostradamnit

unread,
Sep 11, 2008, 10:36:35 AM9/11/08
to Satchmo users
What's really weird about that is that's not even the file I'm trying
to upload?!? It must be the default image that it loads to generate
the thumbnail?!? I'm sooo confused :|

Looks like I'm gonna have to delve into the code, which is NOT on my
current TODO list :(

Bruce Kroeze

unread,
Sep 11, 2008, 12:02:05 PM9/11/08
to satchm...@googlegroups.com
On Thu, Sep 11, 2008 at 7:36 AM, nostradamnit <sam.cr...@gmail.com> wrote:

What's really weird about that is that's not even the file I'm trying
to upload?!? It must be the default image that it loads to generate
the thumbnail?!? I'm sooo confused :|

Looks like I'm gonna have to delve into the code, which is NOT on my
current TODO list :(

I think Guenter has it.  I bet you've got a space at the end of your MEDIA_ROOT in settings.py.

It really does work, for many stores, using the latest codebase.
 

nostradamnit

unread,
Sep 11, 2008, 12:43:53 PM9/11/08
to Satchmo users
Unfortunately, that's not the problem, but I have at least figured out
that, despite passing the tests, PIL still doesn't see the jpeg
decoder, as the snippet below shows. Back to the PIL config goose
chase...

>>> import Image
>>> img = Image.open('/home/sam/Documents/test_image.jpg').copy()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/PIL-1.1.6-py2.5-linux-
i686.egg/Image.py", line 717, in copy
self.load()
File "/usr/lib/python2.5/site-packages/PIL-1.1.6-py2.5-linux-
i686.egg/ImageFile.py", line 180, in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "/usr/lib/python2.5/site-packages/PIL-1.1.6-py2.5-linux-
i686.egg/Image.py", line 375, in _getdecoder
raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available
>>>

I'll report back :)

On Sep 11, 6:02 pm, "Bruce Kroeze" <bkro...@gmail.com> wrote:

David Lindquist

unread,
Sep 11, 2008, 12:50:00 PM9/11/08
to satchm...@googlegroups.com
I had this same problem, but with PNGs. My solution was to recompile
PIL with zLib support. Here is thread FWIW:

http://groups.google.com/group/satchmo-users/browse_thread/thread/
4ce9d54d392de367/3b27340e1e9697c7?hl=en&lnk=gst&q=pil

nostradamnit

unread,
Sep 11, 2008, 12:59:02 PM9/11/08
to Satchmo users
SUCCESS!

I completely removed the PIL package and egg from /usr/lib/python2.5/
site-packages/ then reinstalled PIL again and it's working now!

Thanks to everyone for your help and support,
Sam

Rene Jochum

unread,
Sep 18, 2008, 10:29:13 AM9/18/08
to Satchmo users
http://pkarl.com/blog/articles/38/freetype-jpeg-zlib-and-the-python-imaging-library-on-osx-105
helped me installing PIL with JPEG support. on Mac OS-X 10.5 Leopard

This Post is only a reference for other's who have the same problems
on Mac OS-X

theskyiscrape

unread,
Sep 24, 2008, 2:38:01 AM9/24/08
to Satchmo users
Here's what I did on Ubuntu for future reference:

1. Download PIL source:

wget http://download.zope.org/distribution/PILwoTk-1.1.6.4.tar.gz

2. Untar the source:

tar xzvf PILwoTk-1.1.6.4.tar.gz

3. On Ubuntu install lib jpeg dev:

sudo apt-get install libjpeg62-dev

4. Build PIL

cd Imaging-1.1.6.4
sudo python setup.py build_ext -f

Check for jpeg OK in build summary:

PIL 1.1.6 BUILD SUMMARY

version 1.1.6 platform linux2 2.5.2 (r252:60911, Apr 21 2008,
11:12:42)

[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]

*** TKINTER support not available --- JPEG support ok --- ZLIB (PNG/
ZIP) support ok *** FREETYPE2 support not available

5. Remove PIL from /usr/lib/python<version>/site-packages:

sudo rm -fr /usr/lib/python2.5/site-packages/PIL*

6. Re-install PIL

sudo python setup.py install


On Sep 18, 7:29 am, Rene Jochum <r...@pc-dummy.net> wrote:
> http://pkarl.com/blog/articles/38/freetype-jpeg-zlib-and-the-python-i...
> helped me installing PIL withJPEGsupport. on Mac OS-X 10.5 Leopard
>
> This Post is only a reference for other's who have the same problems
> on Mac OS-X
>
> On 11 Sep., 18:50, David Lindquist <david.lindqu...@gmail.com> wrote:
>
> > I had this same problem, but with PNGs. My solution was to recompile
> > PIL with zLib support. Here is thread FWIW:
>
> >http://groups.google.com/group/satchmo-users/browse_thread/thread/
> > 4ce9d54d392de367/3b27340e1e9697c7?hl=en&lnk=gst&q=pil
>
> > On Sep 11, 2008, at 9:43 AM, nostradamnit wrote:
>
> > > Unfortunately, that's not the problem, but I have at least figured out
> > > that, despite passing the tests, PIL still doesn't see thejpeg
> > >decoder, as the snippet below shows. Back to the PIL config goose
> > > chase...
>
> > >>>> import Image
> > >>>> img = Image.open('/home/sam/Documents/test_image.jpg').copy()
> > > Traceback (most recent call last):
> > > File "<stdin>", line 1, in <module>
> > > File "/usr/lib/python2.5/site-packages/PIL-1.1.6-py2.5-linux-
> > > i686.egg/Image.py", line 717, in copy
> > > self.load()
> > > File "/usr/lib/python2.5/site-packages/PIL-1.1.6-py2.5-linux-
> > > i686.egg/ImageFile.py", line 180, in load
> > > d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
> > > File "/usr/lib/python2.5/site-packages/PIL-1.1.6-py2.5-linux-
> > > i686.egg/Image.py", line 375, in _getdecoder
> > > raise IOError("decoder%s not available" % decoder_name)
> > > IOError:decoderjpegnot available

Chris Moffitt

unread,
Sep 24, 2008, 10:36:25 AM9/24/08
to satchm...@googlegroups.com
I'm not quite clearing why sudo apt-get install python-imaging doesn't just work. That's what I normally do on Ubuntu.

-Chris


Reply all
Reply to author
Forward
0 new messages