我在一个文件夹中有500张图片。我想在python中使用异常处理删除不可读的图像。
当我使用时:
os.remove()
然后我收到一条错误消息:
[WinError 3] The system cannot find the path specified: '-coast-ocean-horizon-sky-sunrise-sunset-dawn-atmosphere-plane-dusk-vehicle-flight-island-yellow-shadows-colors-holidays-hot-reflections-the-mediterranean-sea-sunset-sun-aegean-sea-atmosphere-of-earth-484653.jpg' "
因为这个
-coast-ocean-horizon-sky-sunrise-sunset-dawn-atmosphere-plane-dusk-vehicle-flight-island-yellow-shadows-colors-holidays-hot-reflections-the-mediterranean-sea-sunset-sun-aegean-sea-atmosphere-of-earth-484653.jpg')
是迭代循环时第一个不可读的图像,我该如何解决?