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:PythonPython36libsite-packagesskimagedata__init__.py", line 109, in camera
return _load("camera.png")
File "C:PythonPython36libsite-packagesskimagedata__init__.py", line 96, in _load
return imread(_os.path.join(data_dir, f), plugin='pil', as_gray=as_gray)
File "C:PythonPython36libsite-packagesskimageio_io.py", line 48, in imread
img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
File "C:PythonPython36libsite-packagesskimageiomanage_plugins.py", line 210, in call_plugin
return func(*args, **kwargs)
File "C:PythonPython36libsite-packagesskimageio_pluginspil_plugin.py", line 36, in imread
return pil_to_ndarray(im, dtype=dtype, img_num=img_num)
File "C:PythonPython36libsite-packagesskimageio_pluginspil_plugin.py", line 66, in pil_to_ndarray
image.seek(i)
File "C:PythonPython36libsite-packagesPILPngImagePlugin.py", line 739, in seek
if not self._seek_check(frame):
File "C:PythonPython36libsite-packagesPILImageFile.py", line 306, in _seek_check
return self.tell() != frame
File "C:PythonPython36libsite-packagesPILPngImagePlugin.py", line 827, in tell
return self.__frame
AttributeError: 'PngImageFile' object has no attribute '_PngImageFile__frame'
我也遇到了类似的问题。对我来说,解决方案是安装和升级scikit-image
模块:
pip install -U scikit-image