Ниже приведен фрагмент кода, который я пытаюсь запустить, но он выдает ошибку. может кто-нибудь помочь
main_fol = '/content/drive/My Drive/Temporary/'
for images in os.listdir(main_fol):
image_sample = cv2.imread(os.path.join(main_fol,images))
plt.imshow(image_sample)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-43-c3d208f97c5e> in <module>()
2 for images in os.listdir(main_fol):
3 image_sample = cv2.imread(os.path.join(main_fol,images))
----> 4 plt.imshow(image_sample)
5 frames
/usr/local/lib/python3.6/dist-packages/matplotlib/image.py in set_data(self, A)
692 not np.can_cast(self._A.dtype, float, "same_kind")):
693 raise TypeError("Image data of dtype {} cannot be converted to "
--> 694 "float".format(self._A.dtype))
695
696 if not (self._A.ndim == 2
TypeError: Image data of dtype object cannot be converted to float