scrapy框架写爬虫内置图片下载出错OSERROR
KFPA 2017-08-11 06:27:30 Traceback (most recent call last):
File "C:\Python36\lib\site-packages\twisted\internet\defer.py", line 1386, in _inlineCallbacks
result = g.send(result)
File "C:\Python36\lib\site-packages\scrapy\core\downloader\middleware.py", line 43, in process_request
defer.returnValue((yield download_func(request=request,spider=spider)))
File "C:\Python36\lib\site-packages\twisted\internet\defer.py", line 1363, in returnValue
raise _DefGen_Return(val)
twisted.internet.defer._DefGen_Return: <200 http://img.mp.itc.cn/upload/20170717/2414501c43934e35868d29a560511458_th.jpg>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python36\lib\site-packages\scrapy\pipelines\files.py", line 356, in media_downloaded
checksum = self.file_downloaded(response, request, info)
File "C:\Python36\lib\site-packages\scrapy\pipelines\images.py", line 98, in file_downloaded
return self.image_downloaded(response, request, info)
File "C:\Python36\lib\site-packages\scrapy\pipelines\images.py", line 102, in image_downloaded
for path, image, buf in self.get_images(response, request, info):
File "C:\Python36\lib\site-packages\scrapy\pipelines\images.py", line 115, in get_images
orig_image = Image.open(BytesIO(response.body))
File "C:\Python36\lib\site-packages\PIL\Image.py", line 2519, in open
% (filename if filename else fp))
OSError: cannot identify image file <_io.BytesIO object at 0x04539A80>
请各位大神帮忙