使用pytesseract库识别验证码时遇到以下报错
AttributeError: 'NoneType' object has no attribute 'bands'
修改PIL库site-packages/PIL/Image.py
1496行
def split(self):
“Split image into bands”
if self.im.bands == 1:
为
def split(self):
“Split image into bands”
self.load()
if self.im.bands == 1:
即可。