python——报错解决:UnidentifiedImageError: cannot identify image file

我在使用网上的远古代码的时候遇到了该错误

解决方法

import Image替换成from PIL import Image

错误原因为:

Image已经被并入PIL库,所以需要从PIL中import即可。

你可能感兴趣的:(python,python,bug,PIL)