Import PIL
使用 PIL.Image.fromstring 函数报错如下:
AttributeError: module ‘PIL.Image’ has no attribute ‘fromstring’
解决办法:
查阅PIL.Image文件中是否有该函数,发现没有但是找到类似函数如下:
PIL.Image.frombytes
说明目前使用PIL版本中删除了名字fromstring,改成了其他名。
Import PIL
使用 PIL.Image.fromstring 函数报错如下:
AttributeError: module ‘PIL.Image’ has no attribute ‘fromstring’
解决办法:
查阅PIL.Image文件中是否有该函数,发现没有但是找到类似函数如下:
PIL.Image.frombytes
说明目前使用PIL版本中删除了名字fromstring,改成了其他名。