diff --git a/scrapy/core/engine.py b/scrapy/core/engine.py index e3eddd046..fb2d09c79 100644 --- a/scrapy/core/engine.py +++ b/scrapy/core/engine.py @@ -180,7 +180,8 @@ class ExecutionEngine: self._start = None exception_traceback = format_exc() logger.error( - f"Error while reading start items and requests: {exception}.\n{exception_traceback}" + f"Error while reading start items and requests: {exception}.\n{exception_traceback}", + exc_info=True, ) else: if isinstance(item_or_request, Request): diff --git a/tests/test_spider.py b/tests/test_spider.py index c3d66617d..ee159a134 100644 --- a/tests/test_spider.py +++ b/tests/test_spider.py @@ -456,13 +456,8 @@ class TestCrawlSpider(TestSpider): crawler = get_crawler(TestSpider) with LogCapture("scrapy.core.engine", propagate=False, level=ERROR) as log: yield crawler.crawl() - log.check( - ( - "scrapy.core.engine", - "ERROR", - "Error while reading start items and requests", - ), - ) + assert "Error while reading start items and requests" in str(log) + assert "did you miss an 's'?" in str(log) class TestSitemapSpider(TestSpider):