解决方法:
这个貌似是属于一个bug
把Image.py中的1500行左右的split函数改成如下即可:

def split(self):"Split image into bands"self.load()if self.im.bands == 1:ims = [self.copy()]else:ims = []#self.load()for i in range(self.im.bands):ims.append(self._new(self.im.getband(i)))return tuple(ims)

转载于:https://www.cnblogs.com/MrLJC/p/4228726.html

PIL中分离通道发生“AttributeError: 'NoneType' object has no attribute 'bands'”相关推荐

  1. Python 中 AttributeError: ‘NoneType‘ object has no attribute ‘X‘ 错误

    文章目录 AttributeError: 'NoneType' object has no attribute 'X' 介绍 AttributeError: 'NoneType' object has ...

  2. FlyAI出现AttributeError: 'NoneType' object has no attribute 'input_x'问题解决

    FlyAI是一个AI竞赛平台,不过多介绍,见官网:https://www.flyai.com/ 笔者系统:Ubuntu 16.04  (安装了ROS kinetic) 使用以下命令进行测试时 ./fl ...

  3. Keras问题“AttributeError: 'NoneType' object has no attribute 'update”解决

    BUG 在使用Keras训练模型时,在每个epoch完成后save_model时会报错 "AttributeError: 'NoneType' object has no attribute ...

  4. 成功解决AttributeError: 'NoneType' object has no attribute '__array_interface__'

    成功解决AttributeError: 'NoneType' object has no attribute '__array_interface__' 目录 解决问题 解决思路 解决方法 原因及思路 ...

  5. Python学习笔记:‘’AttributeError: NoneType object has no attribute‘’

    前言 最近在学习python,犯了很多低级错误,总结一下 目录 文章目录 前言 目录 问题 出处 方案 问题 AttributeError: 'NoneType' object has no attr ...

  6. Scrapy爬虫报错AttributeError: ‘NoneType‘ object has no attribute ‘write‘

    前言 一.报错 AttributeError: 'NoneType' object has no attribute 'write' 二.报错原因 1.piplines文件中的方法不能自定义的呢 开始 ...

  7. AttributeError: 'NoneType' object has no attribute 'split' 报错处理

    报错场景 social_django 组件对原生 django 的支持较好, 但是因为 在此DRF进行的验证为 JWT 方式 和 django 的验证存在区别, 因此需要进行更改自行支持 JWT 方式 ...

  8. python爬虫数据寻找过程(解决爬虫异步导致AttributeError: 'NoneType' object has no attribute 'find_all'错误)

    前边写了url的分析 我们爬取想要的数据,一般是打开网站链接,用浏览器的elements功能对网页标签进行数据分析,确定想要的数据的位置,再在代码中通过requests库的get和post方式发起请求 ...

  9. 报错AttributeError: ‘NoneType‘ object has no attribute ‘shape‘

    环境: python3.6.4 opencv3.4.1.15 运行目标跟踪object_tracking文件夹中的mean函数时报错且不显示视频结果 Traceback (most recent ca ...

最新文章

  1. GoogleTest测试框架搭建方法
  2. 使用STVP解除STM32读保护
  3. 是时候重新定义安全了,阿里云肖力解读安全责任共担模型
  4. 单片机定时器精准定时_8051单片机(STC89C52)定时器实现10ms精准定时
  5. 【实验吧】编程循环求底运算
  6. MongoDB常见面试题及答案模板
  7. StereoBM::disp12MaxDiff Crash the Release
  8. Docker基础入门总结
  9. 百度App上线“发现”频道 增加电商和本地服务入口
  10. tshark 和 tcpdump 的区别
  11. 约束布局(ConstraintLayout)1.1.2 版本的新特性
  12. sublime Text3安装可以使xml格式化的插件
  13. Matlab for Mac 中文路径乱码解决
  14. cgroup学习(二)——cgroup框架结构
  15. paip.读取WEB.XML中的参数值总结
  16. 字节码指令之控制转移指令
  17. jQuery图片预加载(延迟加载)之插件Lazy Load
  18. CVPR2020-深度图超分辨率DSR新方法| Channel Attention based Iterative Residual Learning for Depth Map SR
  19. 浏览器主流内核分析,浏览器版本过低升级方法
  20. python开发_filecmp

热门文章

  1. python is not allowed to run_【无法解决】PySpider的部署运行而非调试界面上RUN运行
  2. 数据结构学习之路-第一章:绪论
  3. 结束语:投递简历和选公司的策略
  4. Jupyter 绘图怎么显示中文
  5. CNN卷积神经网络深度解析
  6. slf4j+log4j2的整合配置
  7. 剖析亿级请求下的多级缓存
  8. Redis 总结精讲
  9. 机器学习算法实现解析:libFM之libFM的训练过程之SGD的方法
  10. 聊聊高并发(二十七)解析java.util.concurrent各个组件(九) 理解ReentrantLock可重入锁