scrapy Unhandled error in Deferred

created at 07-04-2021 views: 1

error message

builtins.TypeError: 'NoneType' object is not iterable
start_requests = iter(self.spider.start_requests())
builtins.TypeError: 'NoneType' object is not iterable

Error code

Unhandled error in Deferred:

Traceback (most recent call last):
  File "c:\users\17293\appdata\local\programs\python\python37\lib\site-packages\scrapy\crawler.py", line 192, in crawl
    return self._crawl(crawler, *args, **kwargs)
  File "c:\users\17293\appdata\local\programs\python\python37\lib\site-packages\scrapy\crawler.py", line 196, in _crawl
    d = crawler.crawl(*args, **kwargs)
  File "c:\users\17293\appdata\local\programs\python\python37\lib\site-packages\twisted\internet\defer.py", line 1613, in unwindGenerator
    return _cancellableInlineCallbacks(gen)
  File "c:\users\17293\appdata\local\programs\python\python37\lib\site-packages\twisted\internet\defer.py", line 1529, in _cancellableInlineCallbacks
    _inlineCallbacks(None, g, status)
--- <exception caught here> ---
  File "c:\users\17293\appdata\local\programs\python\python37\lib\site-packages\twisted\internet\defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "c:\users\17293\appdata\local\programs\python\python37\lib\site-packages\scrapy\crawler.py", line 88, in crawl
    start_requests = iter(self.spider.start_requests())
builtins.TypeError: 'NoneType' object is not iterable

reason

scrapy crawl spier_name -s LOG_FILE=all.log

solution

Change spier_name to your crawler name

Please log in to leave a comment.