From be71f98e92688c759d3af48101617229dcdfe05f Mon Sep 17 00:00:00 2001 From: kirankoduru Date: Sat, 29 Jul 2017 20:51:54 -0400 Subject: [PATCH] Explicit message for scrapy parse callback The scrapy parse method raises a NotImplementedError when not defined, but for new comers it can be hard to debug what might be going wrong. Adding an explicit message for NotImplementedError will help new users. --- scrapy/spiders/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapy/spiders/__init__.py b/scrapy/spiders/__init__.py index 30cb7590a..c6b92f8eb 100644 --- a/scrapy/spiders/__init__.py +++ b/scrapy/spiders/__init__.py @@ -87,7 +87,7 @@ class Spider(object_ref): return Request(url, dont_filter=True) def parse(self, response): - raise NotImplementedError + raise NotImplementedError('Spider.parse callback is not defined') @classmethod def update_settings(cls, settings):