title: scrapy error : exceptions.IOError: cannot identify image file
body: <p>I'm getting the following error many times without knowing the image file name or the response url to track it:</p>
  
  <pre><code>2012-08-20 08:14:34+0000 [spider] Unhandled Error
  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 545, in _runCallbacks
      current.result = callback(current.result, *args, **kw)
    File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 362, in callback
      self._startRunCallbacks(result)
    File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 458, in _startRunCallbacks
      self._runCallbacks()
    File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 545, in _runCallbacks
      current.result = callback(current.result, *args, **kw)
  --- &lt;exception caught here&gt; ---
    File "/usr/lib/pymodules/python2.7/scrapy/contrib/pipeline/images.py", line 204, in media_downloaded
      checksum = self.image_downloaded(response, request, info)
    File "/usr/lib/pymodules/python2.7/scrapy/contrib/pipeline/images.py", line 252, in image_downloaded
      for key, image, buf in self.get_images(response, request, info):
    File "/usr/lib/pymodules/python2.7/scrapy/contrib/pipeline/images.py", line 261, in get_images
      orig_image = Image.open(StringIO(response.body))
    File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1980, in open
      raise IOError("cannot identify image file")
  exceptions.IOError: cannot identify image file
  </code></pre>
  
  <p>So, how could I solve this issue? cause it stops my spider after a specific number of errors that I already defined in settings.py</p>