Scrapy运行Demo报下面错。

繒經最羙 发布于 2016/05/23 08:55
阅读 775
收藏 0


C:\Users\Administrator\PycharmProjects\MyScrapyProject\MyScrapyProject\spiders>s
crapy runspider dmoz_spider.py
2016-05-23 08:35:42 [scrapy] INFO: Scrapy 1.1.0 started (bot: MyScrapyProject)
2016-05-23 08:35:42 [scrapy] INFO: Overridden settings: {'ROBOTSTXT_OBEY': True,
 'NEWSPIDER_MODULE': 'MyScrapyProject.spiders', 'SPIDER_MODULES': ['MyScrapyProj
ect.spiders'], 'BOT_NAME': 'MyScrapyProject'}
2016-05-23 08:35:42 [scrapy] INFO: Enabled extensions:
['scrapy.extensions.corestats.CoreStats', 'scrapy.extensions.logstats.LogStats']


Unhandled error in Deferred:
2016-05-23 08:35:42 [twisted] CRITICAL: Unhandled error in Deferred:




Traceback (most recent call last):
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\commands\runspider.py", line 87, in run
    self.crawler_process.crawl(spidercls, **opts.spargs)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\crawler.py", line 163, in crawl
    return self._crawl(crawler, *args, **kwargs)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\crawler.py", line 167, in _crawl
    d = crawler.crawl(*args, **kwargs)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\twisted\internet\defer.py", line 1274, in unwindGenerator
    return _inlineCallbacks(None, gen, Deferred())
--- <exception caught here> ---
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\twisted\internet\defer.py", line 1128, in _inlineCallbacks
    result = g.send(result)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\crawler.py", line 72, in crawl
    self.engine = self._create_engine()
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\crawler.py", line 97, in _create_engine
    return ExecutionEngine(self, lambda _: self.stop())
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\core\engine.py", line 68, in __init__
    self.downloader = downloader_cls(crawler)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\core\downloader\__init__.py", line 88, in __init__
    self.middleware = DownloaderMiddlewareManager.from_crawler(crawler)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\middleware.py", line 58, in from_crawler
    return cls.from_settings(crawler.settings, crawler)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\middleware.py", line 34, in from_settings
    mwcls = load_object(clspath)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\utils\misc.py", line 44, in load_object
    mod = import_module(module)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\import
lib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import


  File "<frozen importlib._bootstrap>", line 969, in _find_and_load


  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked


  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked


  File "<frozen importlib._bootstrap_external>", line 662, in exec_module


  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed


  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\downloadermiddlewares\retry.py", line 23, in <module>
    from scrapy.xlib.tx import ResponseFailed
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\xlib\tx\__init__.py", line 3, in <module>
    from twisted.web import client
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\twisted\web\client.py", line 41, in <module>
    from twisted.internet.endpoints import TCP4ClientEndpoint, SSL4ClientEndpoin
t
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\twisted\internet\endpoints.py", line 34, in <module>
    from twisted.internet.stdio import StandardIO, PipeAddress
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\twisted\internet\stdio.py", line 30, in <module>
    from twisted.internet import _win32stdio
builtins.ImportError: cannot import name '_win32stdio'
2016-05-23 08:35:42 [twisted] CRITICAL:
Traceback (most recent call last):
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\twisted\internet\defer.py", line 1128, in _inlineCallbacks
    result = g.send(result)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\crawler.py", line 72, in crawl
    self.engine = self._create_engine()
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\crawler.py", line 97, in _create_engine
    return ExecutionEngine(self, lambda _: self.stop())
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\core\engine.py", line 68, in __init__
    self.downloader = downloader_cls(crawler)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\core\downloader\__init__.py", line 88, in __init__
    self.middleware = DownloaderMiddlewareManager.from_crawler(crawler)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\middleware.py", line 58, in from_crawler
    return cls.from_settings(crawler.settings, crawler)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\middleware.py", line 34, in from_settings
    mwcls = load_object(clspath)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\utils\misc.py", line 44, in load_object
    mod = import_module(module)
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\import
lib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 662, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\downloadermiddlewares\retry.py", line 23, in <module>
    from scrapy.xlib.tx import ResponseFailed
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\scrapy\xlib\tx\__init__.py", line 3, in <module>
    from twisted.web import client
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\twisted\web\client.py", line 41, in <module>
    from twisted.internet.endpoints import TCP4ClientEndpoint, SSL4ClientEndpoin
t
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\twisted\internet\endpoints.py", line 34, in <module>
    from twisted.internet.stdio import StandardIO, PipeAddress
  File "c:\users\administrator\appdata\local\programs\python\python35\lib\site-p
ackages\twisted\internet\stdio.py", line 30, in <module>
    from twisted.internet import _win32stdio
ImportError: cannot import name '_win32stdio'


C:\Users\Administrator\PycharmProjects\MyScrapyProject\MyScrapyProject\spiders>
返回顶部
顶部