Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AKShare 接口问题报告: ak.bond_zh_hs_daily(symbol) #4751

Closed
carusyte opened this issue Apr 15, 2024 · 1 comment
Closed

AKShare 接口问题报告: ak.bond_zh_hs_daily(symbol) #4751

carusyte opened this issue Apr 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@carusyte
Copy link
Contributor

遇到任何问题,请先确认您的 AKShare 版本是最新的

pip install akshare --upgrade  # Python 版本需要大于等于 3.8

描述遇到的问题

  1. 操作系统版本: macOS 12.7.4
  2. Python 版本: 3.12.2
  3. AKShare 版本: 1.13.37
  4. 接口的名称和代码: ak.bond_zh_hs_daily(symbol)
  5. 接口报错的截图或代码:
  File "/home/jx/.pyenv/versions/3.12.2/envs/venv_3.12.2/lib/python3.12/site-packages/akshare/bond/bond_zh_sina.py", line 128, in bond_zh_hs_daily
    data_df["date"] = pd.to_datetime(data_df["date"], errors="coerce").dt.date
                                     ~~~~~~~^^^^^^^^
  File "/home/jx/.pyenv/versions/3.12.2/envs/venv_3.12.2/lib/python3.12/site-packages/pandas/core/frame.py", line 4090, in __getitem__
    indexer = self.columns.get_loc(key)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jx/.pyenv/versions/3.12.2/envs/venv_3.12.2/lib/python3.12/site-packages/pandas/core/indexes/range.py", line 417, in get_loc
    raise KeyError(key)
KeyError: 'date'
  1. 期望获得的正确结果:
    获取债券历史数据的接口成功率不高,需要优化或开始寻找其他替代数据源
@carusyte carusyte added the bug Something isn't working label Apr 15, 2024
@albertandking
Copy link
Collaborator

4. bond_zh_hs_daily

接口测试正常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants