PIL中分离通道发生“AttributeError: 'NoneType' object has no attribute 'bands'”
解决方法:
这个貌似是属于一个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)												
											PIL中分离通道发生“AttributeError: 'NoneType' object has no attribute 'bands'”的更多相关文章
- AttributeError: 'NoneType' object has no attribute 'split'  报错处理
		
报错场景 social_django 组件对原生 django 的支持较好, 但是因为 在此DRF进行的验证为 JWT 方式 和 django 的验证存在区别, 因此需要进行更改自行支持 JWT 方式 ...
 - Keras AttributeError 'NoneType' object has no attribute '_inbound_nodes'
		
问题说明: 首先呢,报这个错误的代码是这行代码: model = Model(inputs=input, outputs=output) 报错: AttributeError 'NoneType' o ...
 - python3  AttributeError: 'NoneType' object has no attribute 'split'
		
from wsgiref.simple_server import make_server def RunServer(environ, start_response): start_response ...
 - python提示AttributeError: 'NoneType' object has no attribute 'append'【转发】
		
在写python脚本时遇到AttributeError: 'NoneType' object has no attribute 'append' a=[] b=[1,2,3,4] a = a.appe ...
 - python提示AttributeError: 'NoneType' object has no attribute 'append'
		
在写python脚本时遇到AttributeError: 'NoneType' object has no attribute 'append' a=[] b=[1,2,3,4] a = a.appe ...
 - pyspark AttributeError: 'NoneType' object has no attribute 'setCallSite'
		
pyspark: AttributeError: 'NoneType' object has no attribute 'setCallSite' 我草,是pyspark的bug.解决方法: prin ...
 - AttributeError: 'NoneType' object has no attribute 'extend'
		
Python使用中可能遇到的小问题 AttributeError: 'NoneType' object has no attribute 'extend' 或者AttributeError: 'Non ...
 - 解决opencv:AttributeError: 'NoneType' object has no attribute 'copy'
		
情况一: 路径中有中文,更改即可 情况二:可以运行代码,在运行结束时显示 AttributeError: 'NoneType' object has no attribute 'copy' 因为如果是 ...
 - appium   报错:AttributeError:"NoneType' object has no attribute 'XXX'
		
报错截图如下: 问题原因: 根据以上报错提示可已看到问题的原因为:logger中没有info此方法的调用,点击"具体报错的位置"上面的链接,可直接定位到具体的报错位置.根据分析所得 ...
 
随机推荐
- bzoj2503&poj3387[NEERC2006]IdealFrame
			
其实只是把别人的题解强行扩写了 写这篇题解之前我不会的预备知识: 欧拉通路:从图中一个点出发不重复地遍历所有边的路径(可以停在另一个点) 欧拉回路:从图中一个点出发不重复地遍历所有边的回路(必须回到出 ...
 - pthread_cond_signal惊群现象
			
1.如下代码所示: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include < ...
 - 【Beta】第五次任务发布
			
PM #100 日常管理&dev版宣传&设计报告管理后台. 后端 #101 完成收藏功能 完成管理员权限表的生成和接入(按位压缩权限表) 验收条件:收藏功能能够正常使用.能够区分常规用 ...
 - MVC前后端数据被编码
			
@{ ViewBag.Title = "Home Page";}<script> function htmldecode(s) { console.log(s); va ...
 - 记录-div绝对定位针对手机浏览器的区别
			
最近搞个wap ,有一个需求就是一些文字描述定位到一张图片上的某个地方,按照以往的方式直接通过定位div position: absolute; PC chrome 模拟手机显示没问题! 但是,在ip ...
 - 浅谈Android中的startActivityForResult和setResult方法
			
引言 我们知道,如果想打开一个新的Activity我们可以使用startActivity方法.今天我们介绍的startActivityForResult不仅可以打开全新的Activity,而且当新的A ...
 - CF451E Devu and Flowers (隔板法 容斥原理 Lucas定理 求逆元)
			
Codeforces Round #258 (Div. 2) Devu and Flowers E. Devu and Flowers time limit per test 4 seconds me ...
 - 代理模式及jdk动态代理原理
			
代理模式 :为其它对象提供代理,以控制对这个对象的访问. 代理模式的特征:代理类(proxyClass)与委托类(realClass)有同样的接口,代理类主要负责为委托类预处理消息.过滤消息.把消息转 ...
 - table td 文字超出显示省略号
			
.autocut { width:250px; overflow:hidden; white-space:nowrap; text-overflow:ellip ...
 - mysql 主从master-slave同步复制 配置,为读写分离准备
			
1.为方便,我在一个windows下安装两个mysql实例,端口分别是 3306.3307 打开 my.ini 或 my-default.ini 文件 配置 basedir datadir 和port ...