Start a new topic

## Crawler error

Hello ,

I am trying to create crawler from but getting below error.Please view my code in attachment file and try to help.


Packing version bdc8ea7-testing
Deploying to Scrapy Cloud project "442308"
Deploy log last 30 lines:
    _run(args, settings)
  File "/usr/local/lib/python2.7/site-packages/sh_scrapy/", line 103, in _run
    _run_scrapy(args, settings)
  File "/usr/local/lib/python2.7/site-packages/sh_scrapy/", line 111, in _run_scrapy
  File "/usr/local/lib/python2.7/site-packages/scrapy/", line 149, in execute
    cmd.crawler_process = CrawlerProcess(settings)
  File "/usr/local/lib/python2.7/site-packages/scrapy/", line 251, in __init__
    super(CrawlerProcess, self).__init__(settings)
  File "/usr/local/lib/python2.7/site-packages/scrapy/", line 137, in __init__
    self.spider_loader = _get_spider_loader(settings)
  File "/usr/local/lib/python2.7/site-packages/scrapy/", line 338, in _get_spider_loader
    return loader_cls.from_settings(settings.frozencopy())
  File "/usr/local/lib/python2.7/site-packages/scrapy/", line 61, in from_settings
    return cls(settings)
  File "/usr/local/lib/python2.7/site-packages/scrapy/", line 25, in __init__
  File "/usr/local/lib/python2.7/site-packages/scrapy/", line 47, in _load_all_spiders
    for module in walk_modules(name):
  File "/usr/local/lib/python2.7/site-packages/scrapy/utils/", line 71, in walk_modules
    submod = import_module(fullpath)
  File "/usr/local/lib/python2.7/importlib/", line 37, in import_module
  File "/app/__main__.egg/books/spiders/", line 20
    item["product_title"]     = product.css("h1 ::text").extract_first()
IndentationError: unexpected indent
{"message": "shub-image-info exit code: 1", "details": null, "error": "image_info_error"}

{"status": "error", "message": "Internal error"}
Deploy log location: /tmp/shub_deploy_rq_5Yl.log
Error: Deploy failed: {"status": "error", "message": "Internal error"}

Please help if any can

(857 Bytes)
1 Comment


As specified by Error message "IndentationError: unexpected indent" there is error in line 20.

When I opened the code in an editor it shows as below, please correct the indentation for item["product_title"] and re-try.

 item["product_name"]     = response.css("ol.product-items > li").extract()

        item["product_title"]     = product.css("h1 ::text").extract_first()

Let us know if you face any issues.



Login to post a comment