You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test tests/test_scheduler.py::TestIntegrationWithDownloaderAwareInMemory::test_integration_downloader_aware_priority_queue raises the following exception:
ERROR scrapy.core.engine:engine.py:308 Stats close failure
Traceback (most recent call last):
File "/home/lukas/Projects/3rd/scrapy/.tox/py/lib/python3.8/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/home/lukas/Projects/3rd/scrapy/scrapy/core/engine.py", line 328, in <lambda>
dfd.addBoth(lambda _: self.crawler.stats.close_spider(spider, reason=reason))
File "/home/lukas/Projects/3rd/scrapy/scrapy/statscollectors.py", line 48, in close_spider
self._persist_stats(self._stats, spider)
File "/home/lukas/Projects/3rd/scrapy/scrapy/statscollectors.py", line 61, in _persist_stats
self.spider_stats[spider.name] = stats
TypeError: unhashable type: 'list'
The exception is only logged by scrapy.core.engine and hence swallowed by py.test. I discovered it accidentally when using the log_cli = true pytest setting.
Steps to Reproduce
Set log_cli = true in pytest.ini
Run tox -e py -- tests/test_scheduler.py -k test_integration_downloader_aware_priority_queue
Versions
Scrapy 2.1.0 / master
Additional context
The issue should be simple to fix, I will prepare a PR for it.
The text was updated successfully, but these errors were encountered:
Lukas0907
added a commit
to Lukas0907/scrapy
that referenced
this issue
Jun 23, 2020
Description
The test
tests/test_scheduler.py::TestIntegrationWithDownloaderAwareInMemory::test_integration_downloader_aware_priority_queue
raises the following exception:The exception is only logged by scrapy.core.engine and hence swallowed by py.test. I discovered it accidentally when using the
log_cli = true
pytest setting.Steps to Reproduce
log_cli = true
in pytest.initox -e py -- tests/test_scheduler.py -k test_integration_downloader_aware_priority_queue
Versions
Scrapy 2.1.0 / master
Additional context
The issue should be simple to fix, I will prepare a PR for it.
The text was updated successfully, but these errors were encountered: