2014-01-29 66 views
0

我工作VTNC,試圖運行Thumbor入門第一個樣本,但它返回我這個錯誤:Thumbor:IO錯誤:解碼JPEG不適

(thumbor)mac:thumbor pzanetti631$ thumbor 
2014-01-29 13:49:32 thumbor:ERROR Could not save as improved image, consider to increase  ImageFile.MAXBLOCK 
Traceback (most recent call last): 
File ".../sandbox/thumbor/lib/python2.7/site-packages/thumbor/engines/pil.py", line 137, in read 
self.image.save(img_buffer, FORMATS[ext], **options) 
File ".../sandbox/thumbor/lib/python2.7/site-packages/PIL/Image.py", line 1420, in save 
self.load() 
File ".../sandbox/thumbor/lib/python2.7/site-packages/PIL/ImageFile.py", line 193, in load 
d = Image._getdecoder(self.mode, d, a, self.decoderconfig) 
File ".../sandbox/thumbor/lib/python2.7/site-packages/PIL/Image.py", line 356, in _getdecoder 
raise IOError("decoder %s not available" % decoder_name) 
IOError: decoder jpeg not available 
2014-01-29 13:49:32 thumbor:ERROR ERROR: Traceback (most recent call last): 
File ".../sandbox/thumbor/lib/python2.7/site-packages/tornado/web.py", line 1115, in _stack_context_handle_exception 
raise_exc_info((type, value, traceback)) 
File ".../sandbox/thumbor/lib/python2.7/site-packages/tornado/stack_context.py", line 302, in wrapped 
ret = fn(*args, **kwargs) 
File ".../sandbox/thumbor/lib/python2.7/site-packages/thumbor/loaders/http_loader.py", line 49, in return_contents 
callback(response.body) 
File ".../sandbox/thumbor/lib/python2.7/site-packages/thumbor/handlers/__init__.py", line 298, in handle_loader_loaded 
buffer = engine.read() 
File ".../sandbox/thumbor/lib/python2.7/site-packages/thumbor/engines/pil.py", line 140, in read 
self.image.save(img_buffer, FORMATS[ext]) 
File ".../sandbox/thumbor/lib/python2.7/site-packages/PIL/Image.py", line 1420, in save 
self.load() 
File ".../sandbox/thumbor/lib/python2.7/site-packages/PIL/ImageFile.py", line 193, in load 
d = Image._getdecoder(self.mode, d, a, self.decoderconfig) 
File ".../sandbox/thumbor/lib/python2.7/site-packages/PIL/Image.py", line 356, in _getdecoder 
raise IOError("decoder %s not available" % decoder_name) 
IOError: decoder jpeg not available 

2014-01-29 13:49:32 tornado.access:ERROR 500 GET /unsafe/300x0/http://www.waterfalls.hamilton.ca/images/Waterfall_Collage_home_sm1.jpg (127.0.0.1) 2077.94ms 

DS

我在Mac上,我已經通過pip安裝了它,繼Documentation之後。它說PIL默認安裝...

我該如何解決這個問題?

這是我pip freeze輸出:

(thumbor)mac:thumbor pzanetti631$ pip freeze 
Pillow==2.1.0 
derpconf==0.4.9 
pycrypto==2.6.1 
pycurl==7.19.3 
python-magic==0.4.6 
six==1.5.2 
thumbor==3.15.0 
tornado==3.1.1 
wsgiref==0.1.2 

乾杯,

- 保羅·扎內蒂

+0

聽起來像是'PIL'未經JPEG支持安裝。你不能重新安裝PIL或在你的程序周圍創建'virtualenv'嗎? – Krumelur

+0

@Krumelur我已經在virtualenv下,無法刪除/安裝PIL ... – sonnuforevis

回答

3

下面是我(奇怪)解決的問題:

1)後安裝Thumbor,刪除枕頭(截至今天,它安裝版本2.1.0);

2)(重新)安裝枕頭(截止到今天,它會安裝版本2.3.0);和

3)之後,(重新)安裝Thumbor

0

這真的很奇怪。我是thumbor的提交者之一。它應該與枕頭2.1.0一起工作。你有沒有安裝PIL?安裝PIL枕頭將不起作用。

對不起,您有任何問題。請您在下次卡住時在項目中創建問題!

乾杯, 貝爾納Heynemann