-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 ファイルに "pass" を残しました。削除され、これは正常に機能しました。

于 2014-08-23T22:45:17.707 に答える