The problem arises when I generate a spider with the name of an already existing module e.g., csv, urllib,...
My guess is that the import mechanism imports the existing module, which most likely does not contain a spider, instead of the generated spider. Hence the no spider found message.
$ scrapy version
Scrapy 1.3.3
$ scrapy genspider csv csv.com
Created spider 'csv' using template 'basic'
$ scrapy runspider csv.py
2017-03-23 16:55:14 [scrapy.utils.log] INFO: Scrapy 1.3.3 started (bot: scrapybot)
2017-03-23 16:55:14 [scrapy.utils.log] INFO: Overridden settings: {'SPIDER_LOADER_WARN_ONLY': True}
Usage
=====
scrapy runspider [options] <spider_file>
runspider: error: No spider found in file: csv.py
The problem arises when I generate a spider with the name of an already existing module e.g., csv, urllib,...
My guess is that the import mechanism imports the existing module, which most likely does not contain a spider, instead of the generated spider. Hence the no spider found message.