Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scrapy_redis.scheduler.Scheduler not compatible with scrapy.dupefilters.BaseDupeFilter #293

Closed
HairlessVillager opened this issue Jun 22, 2024 · 0 comments · Fixed by #294

Comments

@HairlessVillager
Copy link
Contributor

self.df = load_object(self.dupefilter_cls).from_spider(spider)

calls from_spider in a dupefilter class.

However, the from_spider ONLY implements in scrapy_redis.dupefilter.RFPDupeFilter, while scrapy.dupefilters.BaseDupeFilter not declares. Which will raise

  File "D:\Anaconda\anaconda3\envs\scrapy\Lib\site-packages\scrapy\crawler.py", line 160, in crawl
    yield self.engine.open_spider(self.spider, start_requests)
AttributeError: type object 'RFPDupeFilter' has no attribute 'from_spider'

and

  File "D:\Anaconda\anaconda3\envs\scrapy\Lib\site-packages\scrapy_redis\scheduler.py", line 149, in flush
    self.df.clear()
AttributeError: 'Scheduler' object has no attribute 'df'

Another user also met the same question: #242 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant