【问题标题】:Getting ImportError when starting pyspider in Terminal在终端中启动 pyspider 时出现 ImportError
【发布时间】:2018-11-09 21:37:14
【问题描述】:

当我在终端中通过pyspider all 启动pyspider 时,它会弹出一个ImportError

ImportError: cannot import name 'Curlasync_HTTPClient' from 'tornado.curl_httpclient'
(/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tornado/curl_httpclient.py)

错误信息中还有其他一些文字,但我认为这是主要原因。

我尝试通过重新安装 tornado(4.5.3) 来重新安装 tornado,但它似乎没有帮助。所以你们中有人遇到过同样的问题吗?任何提示将不胜感激。提前致谢。

配置信息:
macOS High Sierra 10.13.4
python版本:3.7.0a2
龙卷风版本:4.5.3

【问题讨论】:

    标签: python python-3.x tornado macos-high-sierra pyspider


    【解决方案1】:

    该类名为CurlAsyncHTTPClient,而不是Curlasync_HTTPClient。看起来有人将async 搜索并替换为async_,因为在Python 3.7 中async 是一个保留字(但在这里并不重要,因为它位于类名的中间)。

    【讨论】:

      猜你喜欢
      • 2019-11-04
      • 2016-06-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-28
      • 2019-06-18
      • 2018-11-01
      相关资源
      最近更新 更多