-1

我正在从云编码服务器(Koding.com)运行 Scrapy。我尝试使用教程来抓取 craigslist 广告,并在运行命令“scrapy crawl craigslist”时收到错误消息。有人可以解释错误信息吗?

2014-08-23 21:31:29+0000 [scrapy] INFO: Scrapy 0.14.4 started (bot: craigslist_sample)
2014-08-23 21:31:30+0000 [scrapy] DEBUG: Enabled extensions: LogStats, TelnetConsole, CloseSpider, WebService, CoreStats, MemoryUsage, SpiderState
Traceback (most recent call last):
  File "/usr/bin/scrapy", line 4, in <module>
    execute()
  File "/usr/lib/python2.7/dist-packages/scrapy/cmdline.py", line 132, in execute
    _run_print_help(parser, _run_command, cmd, args, opts)
  File "/usr/lib/python2.7/dist-packages/scrapy/cmdline.py", line 97, in _run_print_help
    func(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/scrapy/cmdline.py", line 139, in _run_command
    cmd.run(args, opts)
  File "/usr/lib/python2.7/dist-packages/scrapy/commands/crawl.py", line 43, in run
    spider = self.crawler.spiders.create(spname, **opts.spargs)
  File "/usr/lib/python2.7/dist-packages/scrapy/command.py", line 34, in crawler
    self._crawler.configure()
  File "/usr/lib/python2.7/dist-packages/scrapy/crawler.py", line 36, in configure
    self.spiders = spman_cls.from_crawler(self)
  File "/usr/lib/python2.7/dist-packages/scrapy/spidermanager.py", line 37, in from_crawler
    return cls.from_settings(crawler.settings)
  File "/usr/lib/python2.7/dist-packages/scrapy/spidermanager.py", line 33, in from_settings
    return cls(settings.getlist('SPIDER_MODULES'))
  File "/usr/lib/python2.7/dist-packages/scrapy/spidermanager.py", line 23, in __init__
    for module in walk_modules(name):
  File "/usr/lib/python2.7/dist-packages/scrapy/utils/misc.py", line 65, in walk_modules
    submod = __import__(fullpath, {}, {}, [''])
  File "/home/woshea/craigslist_sample/craigslist_sample/spiders/test.py", line 3, in <module>
    from craigslist_sample.items import CraigslistSampleItem 
  File "/home/woshea/craigslist_sample/craigslist_sample/items.py", line 14
4

1 回答 1

0

解决了这个问题 - 在 items.py 文件中留下了“通过”。删除,这工作正常。

于 2014-08-23T22:45:17.707 回答