Discuss / Python / >>> im.thumbnail((248, 88)),出现下面错误,百度也没找到原因,求帮忙

>>> im.thumbnail((248, 88)),出现下面错误,百度也没找到原因,求帮忙

Topic source

哒摩_

#1 Created at ... [Delete] [Delete and Lock User]

im.thumbnail((248, 88)) Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/PIL/Image.py", line 416, in _getdecoder decoder = getattr(core, decoder_name + "_decoder") AttributeError: 'module' object has no attribute 'zip_decoder'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.4/dist-packages/PIL/Image.py", line 1814, in thumbnail im = self.resize(size, resample) File "/usr/local/lib/python3.4/dist-packages/PIL/Image.py", line 1557, in resize self.load() File "/usr/local/lib/python3.4/dist-packages/PIL/ImageFile.py", line 203, in load d = Image._getdecoder(self.mode, d, a, self.decoderconfig) File "/usr/local/lib/python3.4/dist-packages/PIL/Image.py", line 420, in _getdecoder raise IOError("decoder %s not available" % decoder_name) OSError: decoder zip not available

哒摩_

#2 Created at ... [Delete] [Delete and Lock User]

im.thumbnail((745, 266)),就不出错, 我用的图片size是745, 266


  • 1

Reply