title: Can't run Scrapy program
body: <p>I have been learning how to work with Scrapy from the following link :</p>
  
  <p><a href="http://doc.scrapy.org/en/master/intro/tutorial.html" rel="nofollow">http://doc.scrapy.org/en/master/intro/tutorial.html</a></p>
  
  <p>When i try to run the code written in the Crawling(<code>scrapy crawl dmoz</code>) section, i get the following error:</p>
  
  <p><code>AttributeError: 'module' object has no attribute 'Spider</code>'</p>
  
  <p>However, i changed "Spider" to "spider" and i got nothing but a new error:</p>
  
  <pre><code>TypeError: Error when calling the metaclass bases
  module.__init__() takes at most 2 arguments (3 given)
  </code></pre>
  
  <p>I'm so confused, what is the problem? Any help would highly be appreciated. Thanks. By the way, i am using Windows.</p>
  
  <p>EDIT(source added):</p>
  
  <p>First i created a project using Scrapy by going to a directory and running the following commands by cmd like so :</p>
  
  <pre><code>cd #DIRECTORY PATH#
  
  scrapy startproject tutorial
  </code></pre>
  
  <p>This will create a folder named tutorial in the given directory. The tutorial folder consists :</p>
  
  <p>tutorial/
      scrapy.cfg
      tutorial/
          <strong>init</strong>.py
          items.py
          pipelines.py
          settings.py
          spiders/
              <strong>init</strong>.py
              ...</p>
  
  <p>Then i defined my items :</p>
  
  <pre><code>import scrapy
  
  class DmozItem(scrapy.Item):
      title = scrapy.Field()
      link = scrapy.Field()
      desc = scrapy.Field()
  </code></pre>
  
  <p>Afterwards, i created the spider:</p>
  
  <p>import scrapy</p>
  
  <pre><code>class DmozSpider(scrapy.Spider):
      name = "dmoz"
      allowed_domains = ["dmoz.org"]
      start_urls = [
          "http://www.dmoz.org/Computers/Programming/Languages/Python/Books/",
          "http://www.dmoz.org/Computers/Programming/Languages/Python/Resources/"
      ]
  
      def parse(self, response):
          filename = response.url.split("/")[-2]
          with open(filename, 'wb') as f:
              f.write(response.body)
  </code></pre>
  
  <p>And after, when running the code,the error is shown. I am using windows 7 64 bit along with Python 2.7 32 bit.</p>
  
  <p>EDIT 2:</p>
  
  <p>I tried uninstalling and installing another Scrapy version but it didn't work. Here is the log:</p>
  
  <pre><code>C:\Users\Novin Pendar\Desktop\FS\tutorial&gt;scrapy crawl dmoz
  2015-03-26 17:48:29+0430 [scrapy] INFO: Scrapy 0.16.5 started (bot: tutorial)
  2015-03-26 17:48:29+0430 [scrapy] DEBUG: Enabled extensions: LogStats, TelnetCon
  sole, CloseSpider, WebService, CoreStats, SpiderState
  C:\Python27\lib\site-packages\scrapy-0.16.5-py2.7.egg\scrapy\__init__.pyc
  Traceback (most recent call last):
    File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
      "__main__", fname, loader, pkg_name)
    File "C:\Python27\lib\runpy.py", line 72, in _run_code
      exec code in run_globals
    File "C:\Python27\lib\site-packages\scrapy-0.16.5-py2.7.egg\scrapy\cmdline.py"
  , line 156, in &lt;module&gt;
      execute()
    File "C:\Python27\lib\site-packages\scrapy-0.16.5-py2.7.egg\scrapy\cmdline.py"
  , line 131, in execute
      _run_print_help(parser, _run_command, cmd, args, opts)
    File "C:\Python27\lib\site-packages\scrapy-0.16.5-py2.7.egg\scrapy\cmdline.py"
  , line 76, in _run_print_help
      func(*a, **kw)
    File "C:\Python27\lib\site-packages\scrapy-0.16.5-py2.7.egg\scrapy\cmdline.py"
  , line 138, in _run_command
      cmd.run(args, opts)
    File "C:\Python27\lib\site-packages\scrapy-0.16.5-py2.7.egg\scrapy\commands\cr
  awl.py", line 43, in run
      spider = self.crawler.spiders.create(spname, **opts.spargs)
    File "C:\Python27\lib\site-packages\scrapy-0.16.5-py2.7.egg\scrapy\command.py"
  , line 33, in crawler
      self._crawler.configure()
    File "C:\Python27\lib\site-packages\scrapy-0.16.5-py2.7.egg\scrapy\crawler.py"
  , line 40, in configure
      self.spiders = spman_cls.from_crawler(self)
    File "C:\Python27\lib\site-packages\scrapy-0.16.5-py2.7.egg\scrapy\spidermanag
  er.py", line 35, in from_crawler
      sm = cls.from_settings(crawler.settings)
    File "C:\Python27\lib\site-packages\scrapy-0.16.5-py2.7.egg\scrapy\spidermanag
  er.py", line 31, in from_settings
      return cls(settings.getlist('SPIDER_MODULES'))
    File "C:\Python27\lib\site-packages\scrapy-0.16.5-py2.7.egg\scrapy\spidermanag
  er.py", line 22, in __init__
      for module in walk_modules(name):
    File "C:\Python27\lib\site-packages\scrapy-0.16.5-py2.7.egg\scrapy\utils\misc.
  py", line 65, in walk_modules
      submod = __import__(fullpath, {}, {}, [''])
    File "tutorial\spiders\dmoz_spider.py", line 3, in &lt;module&gt;
      class DmozSpider(scrapy.Spider):
  AttributeError: 'module' object has no attribute 'Spider'
  </code></pre>
  
  <p>EDIT 3:</p>
  
  <p>The problem is solved. I downloaded the latest version of Scrapy(0.24) and installed. Everything worked so great. Just wanted to say to people who have the same problem that i used to, so, they will save them a lot of time. Thanks.</p>