From 9511a3154e8847d618a3b859c6697b0b3b2bc65d Mon Sep 17 00:00:00 2001 From: Ismael Carnales Date: Fri, 30 Jul 2010 14:49:07 -0300 Subject: [PATCH] Fix error message when spider not found in parse command --- scrapy/commands/parse.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scrapy/commands/parse.py b/scrapy/commands/parse.py index c1b46edf0..411e52371 100644 --- a/scrapy/commands/parse.py +++ b/scrapy/commands/parse.py @@ -84,6 +84,9 @@ class Command(ScrapyCommand): return else: spider = spiders.create_for_request(request) + if spider is None: + log.msg('Unable to find spider for URL: %s' % args[0], log.ERROR) + return scrapymanager.configure() scrapymanager.queue.append_request(request, spider) @@ -112,7 +115,7 @@ class Command(ScrapyCommand): for rule in spider.rules: if rule.link_extractor.matches(response.url) \ and rule.callback: - + items, links = self.run_callback(spider, response, rule.callback, args, opts)