sunner / buzz2weibo

将Google+同步转发到新浪微博,包括图片、文字、链接和地理坐标
http://weibo.com/sunnersun
MIT License
34 stars 10 forks source link

IOError: encoder jpeg not available #7

Closed wyvernbai closed 12 years ago

wyvernbai commented 12 years ago

Here is the output:


syncing z124jnxgloiiflprf04ci5chptn5fboizrs0k https://plus.google.com/108880597196842544749/posts/gRM3uZ1yKhq 水立方 & 西单apple store...其实水是挖坑时候发现的,让我围起来了.... http://lh6.googleusercontent.com/--uA08CJFgnc/T6ZuSeASSOI/AAAAAAAABaA/trWICcMseo8/2012-05-06_20.21.34.png http://lh3.googleusercontent.com/-eeazkQ71ngA/T6ZuV06dGOI/AAAAAAAABaI/ztr5ngTlhpM/2012-05-06_20.25.42.png http://lh4.googleusercontent.com/-lI1tPh8CO_0/T6ZuZH_pxiI/AAAAAAAABaQ/RmbJRdSpj70/2012-05-06_20.26.56.png [None, None] Traceback (most recent call last): File "buzz2weibo.py", line 175, in if post2weibo(api, act): File "buzz2weibo.py", line 87, in post2weibo imagefile = catimages(imagefiles) File "buzz2weibo.py", line 60, in catimages result_img.save(imagefile) File "/usr/lib/python2.6/site-packages/PIL/Image.py", line 1405, in save save_handler(self, fp, filename) File "/usr/lib/python2.6/site-packages/PIL/JpegImagePlugin.py", line 409, in _save ImageFile._save(im, fp, [("jpeg", (0,0)+im.size, 0, rawmode)]) File "/usr/lib/python2.6/site-packages/PIL/ImageFile.py", line 487, in _save e = Image._getencoder(im.mode, e, a, im.encoderconfig) File "/usr/lib/python2.6/site-packages/PIL/Image.py", line 391, in _getencoder raise IOError("encoder %s not available" % encoder_name) IOError: encoder jpeg not available


the Error occurs when post have multi-pictures

wyvernbai commented 12 years ago

另外,这个异常没有做处理,不能跳过继续同步post...

sunner commented 12 years ago

怎么会不支持jpeg呢?你的是什么系统?可能在这个上面pil还要另外加个库才能支持jpeg

wyvernbai commented 12 years ago

嗯。是centOS, 是缺少libjpeg-devel的原因,重新编译安装了PIL,现在正常了

sunner commented 12 years ago

yum里不带PIL,还是带的PIL不含jpeg?

wyvernbai commented 12 years ago

yum里面不带PIL,我是手动编译的。编译PIL之前需要安装freetype freetype-devel libpng libpng-devel libjpeg libjpeg-devel这些包。 之前安装libjpeg了,但是没有安装libjpeg-devel导致的错误。