报错信息大致如下: 

redis.exceptions.ResponseError: WRONGTYPE Operation against a key holding the wrong kind of value

解决方案:

是发现项目的settings.py文件中的

SCHEDULER_QUEUE_CLASS = "scrapy_redis.queue.SpiderStack"

改为

SCHEDULER_QUEUE_CLASS = "scrapy_redis.queue.SpiderPriorityQueue"

主要是受到如下这篇文章中:

  https://segmentfault.com/a/1190000014716549

的如下这段话的启发修改的,修改后的确就没有报错了,问题解决。

scrapy-redis 的项目中遇到redis报错的解决方案

 

相关文章:

  • 2021-12-14
  • 2021-05-03
  • 2022-12-23
  • 2022-01-01
  • 2022-01-01
  • 2021-09-02
  • 2022-12-23
猜你喜欢
  • 2021-08-28
  • 2022-12-23
  • 2021-10-21
  • 2021-04-16
  • 2021-04-02
  • 2022-01-01
  • 2021-12-09
相关资源
相似解决方案