0
from PIL import Image as image
img = image.open(filename)
img = img.resize((640,640))

このコードは Windows では問題なく動作しますが、ubuntu では問題が発生しています。エラーは Traceback (最新の呼び出しが最後) です。

File "/home/prathprabhudesai/Imagga/Classifiertraining.py", line 82, in <module>
    img = img.resize((640,640))                           #Resize 
  File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1318, in resize
    self.load()
  File "/usr/lib/python2.7/dist-packages/PIL/ImageFile.py", line 192, in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
AttributeError: 'module' object has no attribute '_getdecoder'
4

1 に答える 1

0

Spyder を使用していたため、同様の問題が発生しました。このスレッドを確認してください: http://comments.gmane.org/gmane.comp.python.scientific.spyder/2465

于 2013-10-20T13:24:59.850 に答える