title: Cannot have two spiders in the same project?
body: <p>I was able to generate the first spider ok</p>
  
  <pre><code>Thu Feb 27 - 01:59 PM &gt; scrapy genspider confluenceChildPages confluence
  Created spider 'confluenceChildPages' using template 'crawl' in module:
    dirbot.spiders.confluenceChildPages
  </code></pre>
  
  <p>But when I attempted to generate another spider, I got this:</p>
  
  <pre><code>Thu Feb 27 - 01:59 PM &gt; scrapy genspider xxx confluence
  Traceback (most recent call last):
    File "/usr/bin/scrapy", line 5, in &lt;module&gt;
      pkg_resources.run_script('Scrapy==0.22.2', 'scrapy')
    File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 505, in run_script
      self.require(requires)[0].run_script(script_name, ns)
    File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1245, in run_script
      execfile(script_filename, namespace, namespace)
    File "/usr/lib/python2.7/site-packages/Scrapy-0.22.2-py2.7.egg/EGG-INFO/scripts/scrapy", line 4, in &lt;module&gt;
      execute()
    File "/usr/lib/python2.7/site-packages/Scrapy-0.22.2-py2.7.egg/scrapy/cmdline.py", line 143, in execute
      _run_print_help(parser, _run_command, cmd, args, opts)
    File "/usr/lib/python2.7/site-packages/Scrapy-0.22.2-py2.7.egg/scrapy/cmdline.py", line 89, in _run_print_help
      func(*a, **kw)
    File "/usr/lib/python2.7/site-packages/Scrapy-0.22.2-py2.7.egg/scrapy/cmdline.py", line 150, in _run_command
      cmd.run(args, opts)
    File "/usr/lib/python2.7/site-packages/Scrapy-0.22.2-py2.7.egg/scrapy/commands/genspider.py", line 68, in run
      crawler = self.crawler_process.create_crawler()
    File "/usr/lib/python2.7/site-packages/Scrapy-0.22.2-py2.7.egg/scrapy/crawler.py", line 87, in create_crawler
      self.crawlers[name] = Crawler(self.settings)
    File "/usr/lib/python2.7/site-packages/Scrapy-0.22.2-py2.7.egg/scrapy/crawler.py", line 25, in __init__
      self.spiders = spman_cls.from_crawler(self)
    File "/usr/lib/python2.7/site-packages/Scrapy-0.22.2-py2.7.egg/scrapy/spidermanager.py", line 35, in from_crawler
      sm = cls.from_settings(crawler.settings)
    File "/usr/lib/python2.7/site-packages/Scrapy-0.22.2-py2.7.egg/scrapy/spidermanager.py", line 31, in from_settings
      return cls(settings.getlist('SPIDER_MODULES'))
    File "/usr/lib/python2.7/site-packages/Scrapy-0.22.2-py2.7.egg/scrapy/spidermanager.py", line 22, in __init__
      for module in walk_modules(name):
    File "/usr/lib/python2.7/site-packages/Scrapy-0.22.2-py2.7.egg/scrapy/utils/misc.py", line 68, in walk_modules
      submod = import_module(fullpath)
    File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
      __import__(name)
    File "/d/Work/TollOnline/Notes/Issues/JIRA/TOL-821_Review_Toll_Online_Confluence_Pages/dirbot-master/dirbot/spiders/confluenceChildPages.py", line 4, in &lt;module&gt;
      from scrapybot.items import ScrapybotItem
  ImportError: No module named scrapybot.items
  </code></pre>
  
  <hr>
  
  <p><strong>Update</strong>: Thursday 27 February 2014, 07:35:24 PM - to add information @omair_77 was asking for.</p>
  
  <p>I am using dirbot from <a href="https://github.com/scrapy/dirbot" rel="nofollow">https://github.com/scrapy/dirbot</a>.</p>
  
  <p>Initial directory structure is:</p>
  
  <pre><code>.
  ./.gitignore
  ./dirbot
  ./dirbot/items.py
  ./dirbot/pipelines.py
  ./dirbot/settings.py
  ./dirbot/spiders
  ./dirbot/spiders/dmoz.py
  ./dirbot/spiders/__init__.py
  ./dirbot/__init__.py
  ./README.rst
  ./scrapy.cfg
  ./setup.py
  </code></pre>
  
  <p>I then try to create two spiders:</p>
  
  <pre><code>scrapy genspider confluenceChildPagesWithTags confluence
  scrapy genspider confluenceChildPages confluence
  </code></pre>
  
  <p>and I get the error on the second <code>genspider</code> command.</p>
  
  <hr>
  
  <p><strong>Update</strong>: Wednesday 5 March 2014, 02:16:07 PM - to add information in relation to @Darian's answer. Showing that scrapybot pops up only after the first genspider command.</p>
  
  <pre><code>Wed Mar 05 - 02:12 PM &gt; find .
  .
  ./.gitignore
  ./dirbot
  ./dirbot/items.py
  ./dirbot/pipelines.py
  ./dirbot/settings.py
  ./dirbot/spiders
  ./dirbot/spiders/dmoz.py
  ./dirbot/spiders/__init__.py
  ./dirbot/__init__.py
  ./README.rst
  ./scrapy.cfg
  ./setup.py
  Wed Mar 05 - 02:13 PM &gt; find . -type f -print0 | xargs -0 grep -i scrapybot
  Wed Mar 05 - 02:14 PM &gt; scrapy genspider confluenceChildPages confluence
  Created spider 'confluenceChildPages' using template 'crawl' in module:
    dirbot.spiders.confluenceChildPages
  Wed Mar 05 - 02:14 PM &gt; find .
  .
  ./.gitignore
  ./dirbot
  ./dirbot/items.py
  ./dirbot/items.pyc
  ./dirbot/pipelines.py
  ./dirbot/settings.py
  ./dirbot/settings.pyc
  ./dirbot/spiders
  ./dirbot/spiders/confluenceChildPages.py
  ./dirbot/spiders/dmoz.py
  ./dirbot/spiders/dmoz.pyc
  ./dirbot/spiders/__init__.py
  ./dirbot/spiders/__init__.pyc
  ./dirbot/__init__.py
  ./dirbot/__init__.pyc
  ./README.rst
  ./scrapy.cfg
  ./setup.py
  Wed Mar 05 - 02:17 PM &gt; find . -type f -print0 | xargs -0 grep -i scrapybot
  ./dirbot/spiders/confluenceChildPages.py:from scrapybot.items import ScrapybotItem
  ./dirbot/spiders/confluenceChildPages.py:        i = ScrapybotItem()
  </code></pre>
  
  <p>and that newly generated confluenceChildPages.py is:</p>
  
  <pre><code>from scrapy.selector import Selector
  from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
  from scrapy.contrib.spiders import CrawlSpider, Rule
  from scrapybot.items import ScrapybotItem
  
  class ConfluencechildpagesSpider(CrawlSpider):
      name = 'confluenceChildPages'
      allowed_domains = ['confluence']
      start_urls = ['http://www.confluence/']
  
      rules = (
          Rule(SgmlLinkExtractor(allow=r'Items/'), callback='parse_item', follow=True),
      )
  
      def parse_item(self, response):
          sel = Selector(response)
          i = ScrapybotItem()
          #i['domain_id'] = sel.xpath('//input[@id="sid"]/@value').extract()
          #i['name'] = sel.xpath('//div[@id="name"]').extract()
          #i['description'] = sel.xpath('//div[@id="description"]').extract()
          return i
  </code></pre>
  
  <p>So I can see it references scrapybot, but I am not sure how to fix it.. very much a n00b still.</p>