title: twisted critical unhandled error on scrapy tutorial
body: <p>I'm new in programming and I'm trying to learn scrapy, using scrapy tutorial: <a href="http://doc.scrapy.org/en/latest/intro/tutorial.html">http://doc.scrapy.org/en/latest/intro/tutorial.html</a></p>
  
  <p>So I ran "scrapy crawl dmoz" command and got this error:</p>
  
  <pre><code>2015-07-14 16:11:02 [scrapy] INFO: Scrapy 1.0.1 started (bot: tutorial)
  2015-07-14 16:11:02 [scrapy] INFO: Optional features available: ssl, http11
  2015-07-14 16:11:02 [scrapy] INFO: Overridden settings: {'NEWSPIDER_MODULE':     'tu
  torial.spiders', 'SPIDER_MODULES': ['tutorial.spiders'], 'BOT_NAME':   'tutorial'}
  
  2015-07-14 16:11:05 [scrapy] INFO: Enabled extensions: CloseSpider, TelnetConsol
  e, LogStats, CoreStats, SpiderState
  Unhandled error in Deferred:
  2015-07-14 16:11:06 [twisted] CRITICAL: Unhandled error in Deferred:
  2015-07-14 16:11:07 [twisted] CRITICAL:
  </code></pre>
  
  <p>I'm using windows 7 and python 2.7. Anybody knows what's the problem? How could I fix that?</p>
  
  <p>EDIT: My spider file code is:</p>
  
  <pre><code># This package will contain the spiders of your Scrapy project
  #
  # Please refer to the documentation for information on how to create and manage
  # your spiders.
  import scrapy
  
  
  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/computer/programming/languages/python/resources/"
  ]
  
      def parse(self, response):
          filename = response.url.split("/")[-2] + '.html'
          with open(filename,'wb') as f:
              f.write(response.body)
  </code></pre>
  
  <p>items.py code:</p>
  
  <pre><code>import scrapy
  
  class DmozItem(scrapy.Item):
      title = scrapy.Field()
      link = scrapy.Field()
      desc = scrapy.Field()
  </code></pre>
  
  <p>pip list: </p>
  
  <ul>
  <li>bootstrap-admin (0.3.3)</li>
  <li>cffi (1.1.2)</li>
  <li>characteristic (14.3.0)</li>
  <li>cryptography (0.9.3)</li>
  <li>cssselect (0.9.1)</li>
  <li>Django (1.7.7)</li>
  <li>django-auth-ldap (1.2.4)</li>
  <li>django-debug-toolbar (1.3.0)</li>
  <li>django-mssql (1.6.2)</li>
  <li>django-pyodbc (0.2.6)</li>
  <li>django-pyodbc-azure (1.2.2)</li>
  <li>django-redator (0.2.3)</li>
  <li>django-reversion (1.8.5)</li>
  <li>django-summernote (0.6.0)</li>
  <li>django-windows-tools (0.1.1)</li>
  <li>django-wysiwyg-redactor (0.4.3.2)</li>
  <li>enum34 (1.0.4)</li>
  <li>ez-setup (0.9)</li>
  <li>flup (1.0.2)</li>
  <li>idna (2.0)</li>
  <li>ipaddress (1.0.13)</li>
  <li>iso8601 (0.1.4)</li>
  <li>logging (0.4.9.6)</li>
  <li>lxml (3.4.4)</li>
  <li>mechanize (0.2.5)</li>
  <li>MySQL-python (1.2.4)</li>
  <li>pbr (0.10.8)</li>
  <li>Pillow (2.7.0)</li>
  <li>pip (7.1.0)</li>
  <li>pyasn1 (0.1.8)</li>
  <li>pyasn1-modules (0.0.6)</li>
  <li>pycparser (2.14)</li>
  <li>pymongo (2.6)</li>
  <li>pyodbc (3.0.7)</li>
  <li>pyOpenSSL (0.15.1)</li>
  <li>pypm (1.4.3)</li>
  <li>python-ldap (2.4.18)</li>
  <li>pythonselect (1.3)</li>
  <li>pywin32 (218.3)</li>
  <li>queuelib (1.2.2)</li>
  <li>Scrapy (1.0.1)</li>
  <li>selenium (2.44.0)</li>
  <li>service-identity (14.0.0)</li>
  <li>setuptools (18.0.1)</li>
  <li>six (1.9.0)</li>
  <li>sqlparse (0.1.15)</li>
  <li>stevedore (1.3.0)</li>
  <li>Twisted (15.2.1)</li>
  <li>virtualenv (1.11.6)</li>
  <li>virtualenv-clone (0.2.5)</li>
  <li>virtualenvwrapper (4.3.2)</li>
  <li>virtualenvwrapper-powershell (12.7.8)</li>
  <li>w3lib (1.11.0)</li>
  <li>xlrd (0.9.2)</li>
  <li>zope.interface (4.1.2)</li>
  </ul>
  
  <p>Thx for the attention and sry for my poor English, isn't my native language.</p>