Я пытался курс sh на NumPy для изображений , и эта строка выдавала ошибку:
>> from skimage import data
>> camera = data.camera()
Ниже приведена трасса ошибки:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-6-8539ecc9e129> in <module>
----> 1 data.camera()
~/.local/lib/python3.6/site-packages/skimage/data/__init__.py in camera()
107 Camera image.
108 """
--> 109 return _load("camera.png")
110
111
~/.local/lib/python3.6/site-packages/skimage/data/__init__.py in _load(f, as_gray)
94 # we lazy import it here
95 from ..io import imread
---> 96 return imread(_os.path.join(data_dir, f), plugin='pil', as_gray=as_gray)
97
98
~/.local/lib/python3.6/site-packages/skimage/io/_io.py in imread(fname, as_gray, plugin, **plugin_args)
46
47 with file_or_url_context(fname) as fname:
---> 48 img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
49
50 if not hasattr(img, 'ndim'):
~/.local/lib/python3.6/site-packages/skimage/io/manage_plugins.py in call_plugin(kind, *args, **kwargs)
208 (plugin, kind))
209
--> 210 return func(*args, **kwargs)
211
212
~/.local/lib/python3.6/site-packages/skimage/io/_plugins/pil_plugin.py in imread(fname, dtype, img_num, **kwargs)
34 with open(fname, 'rb') as f:
35 im = Image.open(f)
---> 36 return pil_to_ndarray(im, dtype=dtype, img_num=img_num)
37 else:
38 im = Image.open(fname)
~/.local/lib/python3.6/site-packages/skimage/io/_plugins/pil_plugin.py in pil_to_ndarray(image, dtype, img_num)
64 while 1:
65 try:
---> 66 image.seek(i)
67 except EOFError:
68 break
~/.local/lib/python3.6/site-packages/PIL/PngImagePlugin.py in seek(self, frame)
737
738 def seek(self, frame):
--> 739 if not self._seek_check(frame):
740 return
741 if frame < self.__frame:
~/.local/lib/python3.6/site-packages/PIL/ImageFile.py in _seek_check(self, frame)
304 raise EOFError("attempt to seek outside sequence")
305
--> 306 return self.tell() != frame
307
308
~/.local/lib/python3.6/site-packages/PIL/PngImagePlugin.py in tell(self)
825
826 def tell(self):
--> 827 return self.__frame
828
829 def load_prepare(self):
AttributeError: 'PngImageFile' object has no attribute '_PngImageFile__frame'
В чем здесь проблема? Я использую Skimage 0.16.2 , Python 3.6.9 на Ubuntu 18.04.3 LTS .
У меня есть много опыт работы с Scikit-Learn, но новичок ie в обработке изображений и лыжном магии.