3

I got the basic Satchmo store up and running with clonesatchmo, however, the images does not show up.

The source shows:

<a href="/product/neat-book/"><img src="" width="" height="" /></a>

with blank where the image source should be. When I run python manage.py satchmo_check, I get no errors.

I'm running python 2.7.1 in Mac OS X Lion and virtualenv.

Here is my pip freeze > requirements :Django==1.3.1

PIL==1.1.7
PyYAML==3.10
Satchmo==0.9.2
TRML2PDF==1.0
-e hg+http://bitbucket.org/bkroeze/django-caching-app-plugins/@b0e77d2243cb5e655472a9f80581663cf59c5aa0#egg=django_caching_app_plugins-dev
-e hg+http://bitbucket.org/bkroeze/django-keyedcache/@4bf75598cab6c807d15c0dd643da2625ceb7d857#egg=django_keyedcache-dev
-e hg+http://bitbucket.org/bkroeze/django-livesettings/@68ac220849162a194fcb466de56febd100aa73a1#egg=django_livesettings-dev
django-registration==0.7
-e hg+http://bitbucket.org/bkroeze/django-signals-ahoy/@87f60574d64b9e87db3a086ee7ddea25f687a811#egg=django_signals_ahoy-dev
-e hg+http://bitbucket.org/bkroeze/django-threaded-multihost/@4aebd54035c8fbd38e4a5c5c87ff977a4740c4c2#egg=django_threaded_multihost-dev
pycrypto==2.4.1
reportlab==2.5
sorl-thumbnail==3.2.5
wsgiref==0.1.2
yolk==0.4.1

Thanks in advance!

4

2 回答 2

0
  1. 尝试运行它来检查问题python manage.py satchmo_check

  2. 阅读本页底部关于安装数据http://www.satchmoproject.com/docs/dev/settings.html#test-and-install-the-data

  3. 你所拥有的版本与这里的不匹配:http: //www.satchmoproject.com/docs/dev/new_installation.html 例如,这一个不同(没有检查所有)easy_install http://www.satchmoproject.com /snapshots/trml2pdf-1.2.tar.gz

我有同样的问题,一旦我做到了

easy_install http://www.satchmoproject.com/snapshots/trml2pdf-1.2.tar.gz
pip install reportlab
rm -r store
python clonesatchmo.py

它工作得很好。

于 2012-05-23T00:21:39.240 回答
0

检查存储目录中的 satchmo.log 文件。如果你发现类似

Sun, 23 Sep 2012 09:59:41 sorl.thumbnail ERROR    Thumbnail tag failed:
Traceback (most recent call last):
  File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/sorl/thumbnail/templatetags/thumbnail.py", line 45, in render
    return self._render(context)
  File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/sorl/thumbnail/templatetags/thumbnail.py", line 97, in _render
    file_, geometry, **options
  File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/sorl/thumbnail/base.py", line 61, in get_thumbnail
    thumbnail)
  File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/sorl/thumbnail/base.py", line 86, in _create_thumbnail
    image = default.engine.create(source_image, geometry, options)
  File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/sorl/thumbnail/engines/base.py", line 17, in create
    image = self.scale(image, geometry, options)
  File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/sorl/thumbnail/engines/base.py", line 49, in scale
    image = self._scale(image, width, height)
  File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/sorl/thumbnail/engines/pil_engine.py", line 62, in _scale
    return image.resize((width, height), resample=Image.ANTIALIAS)
  File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/PIL/Image.py", line 1290, in resize
    self.load()
  File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/PIL/ImageFile.py", line 189, in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
  File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/PIL/Image.py", line 385, in _getdecoder
    raise IOError("decoder %s not available" % decoder_name)
IOError: decoder zip not available

在安装 PIL 之前,您可能必须安装一些库。

就我而言,问题已通过以下方式解决:

> cd $my_virtual_env/lib
> ln -s /usr/lib/i386-linux-gnu/libjpeg.so
> ln -s /usr/lib/i386-linux-gnu/libfreetype.so
> ln -s /usr/lib/i386-linux-gnu/libz.so
> sudo pip uninstall PIL
> sudo pip install pillow

我阅读以找到解决方案的页面:

希望这可以帮助

于 2012-09-23T17:46:19.727 回答