为了账号安全,请及时绑定邮箱和手机立即绑定

爬取京东图片遇到下面错误

爬取京东图片遇到下面错误

weibo_YL心向阳光123_0 2019-10-25 15:28:16
raise IOError("cannot identify image file %r" % (filename if filename else fp))OSError: cannot identify image file <_io.BytesIO object at 0x0000000005786258>Traceback (most recent call last):  File "D:\Anaconda\lib\site-packages\scrapy\pipelines\files.py", line 419, in media_downloaded    checksum = self.file_downloaded(response, request, info)  File "D:\Anaconda\lib\site-packages\scrapy\pipelines\images.py", line 102, in file_downloaded    return self.image_downloaded(response, request, info)  File "D:\Anaconda\lib\site-packages\scrapy\pipelines\images.py", line 106, in image_downloaded    for path, image, buf in self.get_images(response, request, info):  File "D:\Anaconda\lib\site-packages\scrapy\pipelines\images.py", line 120, in get_images    orig_image = Image.open(BytesIO(response.body))  File "D:\Anaconda\lib\site-packages\PIL\Image.py", line 2818, in open    raise IOError("cannot identify image file %r" % (filename if filename else fp))OSError: cannot identify image file <_io.BytesIO object at 0x0000000005BAC5C8>2019-10-25 14:46:58 [scrapy.pipelines.files] ERROR: File (unknown-error): Error processing file from <GET https://img12.360buyimg.com/n7/jfs/t1/69927/11/11374/77087/5d8c207eE84aa9483/30b076d3d8e31216.jpg> referred in <None>Traceback (most recent call last):  File "D:\Anaconda\lib\site-packages\scrapy\pipelines\files.py", line 419, in media_downloaded    checksum = self.file_downloaded(response, request, info)  File "D:\Anaconda\lib\site-packages\scrapy\pipelines\images.py", line 102, in file_downloaded    return self.image_downloaded(response, request, info)  File "D:\Anaconda\lib\site-packages\scrapy\pipelines\images.py", line 106, in image_downloaded    for path, image, buf in self.get_images(response, request, info):  File "D:\Anaconda\lib\site-packages\scrapy\pipelines\images.py", line 120, in get_images    orig_image = Image.open(BytesIO(response.body))  File "D:\Anaconda\lib\site-packages\PIL\Image.py", line 2818, in open    raise IOError("cannot identify image file %r" % (filename if filename else fp))OSError: cannot identify image file <_io.BytesIO object at 0x0000000005BAC830>
查看完整描述

目前暂无任何回答

  • 0 回答
  • 0 关注
  • 2079 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信