Python运行过程中报错:AttributeError: ‘NoneType‘ object has no attribute ‘shape‘

Python运行过程中报错AttributeError: 'NoneType' object has no attribute 'shape',一般是路径设置的不对。

解决方法:重新设置路径

 Python运行过程中报错:AttributeError: ‘NoneType‘ object has no attribute ‘shape‘_第1张图片

正确的路径如图所示,文件夹后面的“/”一定要加上,不然读取不了文件夹里面的图片。

你可能感兴趣的:(python,开发语言,后端)