当前位置:   article > 正文

Scrapy报错'float' object is not iterable解决方法_scrapy 'float' object is not iterable

scrapy 'float' object is not iterable
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)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17

搜索发现是Twisted库的版本问题,我使用的是conda安装的默认Twisted的版本是17.1.0需要降级到16.6.0,使用命令conda install Twisted==16.6.0。
参考这个

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/199625
推荐阅读
相关标签
  

闽ICP备14008679号