赞
踩
ypeError: 'float' object is not iterable
2018-02-02 10:13:50 [scrapy] ERROR: Error downloading <GET http://quotes.toscrape.com/page/2/>
TypeError: 'float' object is not iterable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mwl/anaconda3/lib/python3.5/site-packages/twisted/internet/defer.py", line 1299, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/home/mwl/anaconda3/lib/python3.5/site-packages/twisted/python/failure.py", line 393, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/home/mwl/anaconda3/lib/python3.5/site-packages/scrapy/core/downloader/middleware.py", line 43, in process_request
defer.returnValue((yield download_func(request=request,spider=spider)))
File "/home/mwl/anaconda3/lib/python3.5/site-packages/scrapy/utils/defer.py", line 45, in mustbe_deferred
result = f(*args, **kw)
File "/home/mwl/anaconda3/lib/python3.5/site-packages/scrapy/core/downloader/handlers/__init__.py", line 65, in download_request
return handler.download_request(request, spider)
搜索发现是Twisted库的版本问题,我使用的是conda安装的默认Twisted的版本是17.1.0需要降级到16.6.0,使用命令conda install Twisted==16.6.0。
参考这个。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。