【问题标题】:Import Error related to Yahoo Finance tool / html5lib install与 Yahoo Finance 工具/html5lib 安装相关的导入错误
【发布时间】:2015-08-25 07:40:20
【问题描述】:

我正在尝试从 Yahoo! 获取股票数据金融。我已安装 (c:\ pip install yahoo-finance),但 iPython 控制台中的导入不起作用。这是我得到的错误:UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 4: invalid start byte

我正在使用 Python 3.4 和 Spyder 2.3.1。

有没有其他人遇到过这种情况?

更新:

导入过程中的unicode错误不再出现,但现在尝试使用yahoo_finance工具时替换为以下...

ImportError: 找不到 html5lib,请安装它

但是,当我运行 help('modules') 时,会列出 html5lib。

【问题讨论】:

  • 感谢 TigerHawkT3 的编辑,更加清晰。

标签: python pandas scrape yahoo-finance


【解决方案1】:

我在 PyCharm 4.5.3 中使用 Python 3.4 时遇到了关于 html5lib 的相同错误,即使我安装了 html5lib。当我重新启动 PyCharm 控制台(我在其中运行代码)时,错误消失并且选项正确加载。

【讨论】:

  • 谢谢奥列格,我会试一试的。
猜你喜欢
  • 1970-01-01
  • 2018-04-10
  • 1970-01-01
  • 1970-01-01
  • 2019-11-25
  • 1970-01-01
  • 2021-09-01
  • 2019-05-12
  • 1970-01-01
相关资源
最近更新 更多