请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

运行 scrapy crawl jobbole 报错

已在虚拟目录中安装成功Pypiwin32, pywin32

在Pycharm中,已经设置Interpretor的虚拟目录 ArticleSpider 

但运行 scrapy crawl jobbole 时,仍报以下错误。不知是什么原因。

---

错误信息

(ArticleSpider) C:\PythonProject\ArticleSpider>scrapy crawl jobbole

2018-02-24 00:18:05 [scrapy.utils.log] INFO: Scrapy 1.5.0 started (bot: ArticleSpider)

2018-02-24 00:18:05 [scrapy.utils.log] INFO: Versions: lxml 4.1.1.0, libxml2 2.9.5, cssselect 1.0.3, parsel 1.3.1, w3lib 1.19.0, Twisted 17.9.0, Python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 16:02:32) [MSC v.1900 64 bit (AMD64)], pyOpenSSL 17.5.0 (OpenSSL 1.1.0g  2 Nov 2017), cryptography 2.1.4, Platform Windows-10-10.0.16299-SP0

2018-02-24 00:18:05 [scrapy.crawler] INFO: Overridden settings: {'BOT_NAME': 'ArticleSpider', 'NEWSPIDER_MODULE': 'ArticleSpider.spiders', 'SPIDER_MODULES': ['ArticleSpider.spiders']}

2018-02-24 00:18:05 [scrapy.middleware] INFO: Enabled extensions:

['scrapy.extensions.corestats.CoreStats',

 'scrapy.extensions.telnet.TelnetConsole',

 'scrapy.extensions.logstats.LogStats']

Unhandled error in Deferred:

2018-02-24 00:18:05 [twisted] CRITICAL: Unhandled error in Deferred:


2018-02-24 00:18:05 [twisted] CRITICAL:

Traceback (most recent call last):

  File "c:\envs\articlespider\lib\site-packages\twisted\internet\defer.py", line 1386, in _inlineCallbacks

    result = g.send(result)

  File "c:\envs\articlespider\lib\site-packages\scrapy\crawler.py", line 80, in crawl

    self.engine = self._create_engine()

  File "c:\envs\articlespider\lib\site-packages\scrapy\crawler.py", line 105, in _create_engine

    return ExecutionEngine(self, lambda _: self.stop())

  File "c:\envs\articlespider\lib\site-packages\scrapy\core\engine.py", line 69, in __init__

    self.downloader = downloader_cls(crawler)

  File "c:\envs\articlespider\lib\site-packages\scrapy\core\downloader\__init__.py", line 88, in __init__

    self.middleware = DownloaderMiddlewareManager.from_crawler(crawler)

  File "c:\envs\articlespider\lib\site-packages\scrapy\middleware.py", line 58, in from_crawler

    return cls.from_settings(crawler.settings, crawler)

  File "c:\envs\articlespider\lib\site-packages\scrapy\middleware.py", line 34, in from_settings

    mwcls = load_object(clspath)

  File "c:\envs\articlespider\lib\site-packages\scrapy\utils\misc.py", line 44, in load_object

    mod = import_module(module)

  File "c:\envs\articlespider\lib\importlib\__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 673, in exec_module

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

  File "c:\envs\articlespider\lib\site-packages\scrapy\downloadermiddlewares\retry.py", line 20, in <module>

    from twisted.web.client import ResponseFailed

  File "c:\envs\articlespider\lib\site-packages\twisted\web\client.py", line 42, in <module>

    from twisted.internet.endpoints import HostnameEndpoint, wrapClientTLS

  File "c:\envs\articlespider\lib\site-packages\twisted\internet\endpoints.py", line 41, in <module>

    from twisted.internet.stdio import StandardIO, PipeAddress

  File "c:\envs\articlespider\lib\site-packages\twisted\internet\stdio.py", line 30, in <module>

    from twisted.internet import _win32stdio

  File "c:\envs\articlespider\lib\site-packages\twisted\internet\_win32stdio.py", line 9, in <module>

    import win32api

ImportError: DLL load failed: The specified module could not be found.


正在回答 回答被采纳积分+3

1回答

王刘奇 2018-02-25 23:10:24
虚拟环境下 进入python解释器  然后 你 导入一下wi...
登录后可查看完整回答登录/注册
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信