admin管理员组文章数量:1534826
[twisted] CRITICAL: Unhandled error in Deferred 解决办法【亲测有效】
SO答案:https://stackoverflow/questions/45314514/scrapy-importerror-no-module-named-pipelines
先说原因:
ITEM_PIPELINES = {
‘tutorial.pipelines.jsonpipeline’: 800, // 错误
‘tutorial.pipelines.jsonpipeline.jsonpipeline’: 800, // 正确,原因是scrapy的目录结构有特殊约定
}
这里把pipiline管道放到pipelines包去了,导致scrapy需要重复一次类名。
----------------
默认pipelines.py包含所有的管道,如下:
ITEM_PIPELINES = {
‘tutorial.pipelines.jsonpipeline1’: 800,
‘tutorial.pipelines.jsonpipeline2’: 801,
}
Unhandled error in Deferred:
2022-04-30 23:19:28 [twisted] CRITICAL: Unhandled error in Deferred:
Traceback (most recent call last):
File "C:\ProgramData\Miniconda3\envs\python383\lib\site-packages\scrapy\crawler.py", line 206, in crawl
return self._crawl(crawler, *args, **kwargs)
File "C:\ProgramData\Miniconda3\envs\python383\lib\site-pack
本文标签: 解决办法CriticaltwistedUnhandledDeferred
版权声明:本文标题:【亲测有效】[twisted] CRITICAL: Unhandled error in Deferred 解决办法 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1726269339a1063627.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论