'NoneType' object has no attribute 'shape'

在进行聚类颜色时出现问题:

 

 出现问题:'NoneType' object has no attribute 'shape'

**解决办法:**

1.检查路径

2.检查路径输入格式:
  2.1 本次错误为路径未写入完全,应该是"/fengshuiling/16.tif"

  2.2 如果路径中“\”号未改为“/”或者“\\”也会报该错误

经过改正,错误消失,可运行

posted @ 2022-05-17 10:29  heyrro  阅读(1232)  评论(0编辑  收藏  举报