import skimage
from skimage import data
camera=data.camera()
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
camera=data.camera()
File "C:\Python\Python36\lib\site-packages\skimage\data\__init__.py", line 109, in camera
return _load("camera.png")
File "C:\Python\Python36\lib\site-packages\skimage\data\__init__.py", line 96, in _load
return imread(_os.path.join(data_dir, f), plugin='pil', as_gray=as_gray)
File "C:\Python\Python36\lib\site-packages\skimage\io\_io.py", line 48, in imread
img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
File "C:\Python\Python36\lib\site-packages\skimage\io\manage_plugins.py", line 210, in call_plugin
return func(*args, **kwargs)
File "C:\Python\Python36\lib\site-packages\skimage\io\_plugins\pil_plugin.py", line 36, in imread
return pil_to_ndarray(im, dtype=dtype, img_num=img_num)
File "C:\Python\Python36\lib\site-packages\skimage\io\_plugins\pil_plugin.py", line 66, in pil_to_ndarray
image.seek(i)
File "C:\Python\Python36\lib\site-packages\PIL\PngImagePlugin.py", line 739, in seek
if not self._seek_check(frame):
File "C:\Python\Python36\lib\site-packages\PIL\ImageFile.py", line 306, in _seek_check
return self.tell() != frame
File "C:\Python\Python36\lib\site-packages\PIL\PngImagePlugin.py", line 827, in tell
return self.__frame
AttributeError: 'PngImageFile' object has no attribute '_PngImageFile__frame'
答案 0 :(得分:0)
我几乎有类似的问题。对我来说,解决方案是安装和升级scikit-image
模块:
pip install -U scikit-image