AttributeError: 'NoneType' object has no attribute 'shape'

上一篇 / 下一篇  2020-01-17 16:31:30 / 个人分类:软件测试干货

im=cv2.imread('D:\Python_workplace\Opencv_use\mydog.jpg')
print(im)
出现异常时:
原因:图片错误/图片地址错误/无图片。
解决方法:
1、检查工程里的图片是否存在。可以先print出来看是否为none.
2、检查图片地址


TAG:

 

评分:0

我来说两句

日历

« 2024-03-28  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

数据统计

  • 访问量: 31901
  • 日志数: 10
  • 图片数: 1
  • 建立时间: 2018-10-17
  • 更新时间: 2020-02-20

RSS订阅

Open Toolbar