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

name collision of spider with existing module #2680

Closed
swoertz opened this issue Mar 23, 2017 · 0 comments · Fixed by #3669
Closed

name collision of spider with existing module #2680

swoertz opened this issue Mar 23, 2017 · 0 comments · Fixed by #3669

Comments

@swoertz
Copy link

swoertz commented Mar 23, 2017

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants