akfamily / akshare

AKShare is an elegant and simple financial data interface library for Python, built for human beings! 开源财经数据接口库
https://akshare.akfamily.xyz
MIT License
9.44k stars 1.9k forks source link

AKShare 接口问题报告 #3846

Closed roywwei closed 1 year ago

roywwei commented 1 year ago

描述遇到的问题

  1. 操作系统版本 sessionInfo() R version 4.3.0 (2023-04-21 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 11 x64 (build 22621) Matrix products: default locale: [1] LC_COLLATE=Chinese (Simplified)_China.utf8 [2] LC_CTYPE=Chinese (Simplified)_China.utf8
    [3] LC_MONETARY=Chinese (Simplified)_China.utf8 [4] LC_NUMERIC=C
    [5] LC_TIME=Chinese (Simplified)_China.utf8
    time zone: Asia/Shanghai tzcode source: internal attached base packages: [1] stats graphics grDevices utils datasets methods base
    other attached packages: [1] reticulate_1.28 loaded via a namespace (and not attached): [1] compiler_4.3.0 here_1.0.1 Matrix_1.5-4.1 rprojroot_2.0.3 tools_4.3.0
    [6] withr_2.5.0 rappdirs_0.3.3 Rcpp_1.0.10 grid_4.3.0 jsonlite_1.8.4 [11] png_0.1-8 lattice_0.21-8
  2. Python 版本 Python 3.9.16 (main, Mar 8 2023, 10:39:24)
  3. AKShare 版本 ak.version '1.10.11'
  4. 接口的名称和代码 公司股本变动-巨潮资讯 接口: stock_share_change_cninfo 目标地址: http://webapi.cninfo.com.cn/#/apiDoc 描述: 巨潮资讯-数据-公司股本变动 限量: 单次获取指定 symbol 在 start_date 和 end_date 之间的公司股本变动数据 输入参数
  5. 接口报错的截图或代码 r语言中:stock_share_change_cninfo_df = ak$stock_share_change_cninfo(symbol="002594", start_date="20091227", end_date="20220713") Error: KeyError: 'records' Python中: stock_share_change_cninfo_df = ak.stock_share_change_cninfo(symbol="002594", start_date="20091227", end_date="20220713") Traceback (most recent call last): File "", line 1, in File "C:\Users\roywei\AppData\Roaming\Python\Python39\site-packages\akshare\stock\stock_share_changes_cninfo.py", line 91, in stock_share_change_cninfo temp_df = pd.DataFrame(data_json["records"]) KeyError: 'records'
  6. 期望获得的正确结果 输出股本变动表。
albertandking commented 1 year ago

描述遇到的问题

  1. 操作系统版本 sessionInfo() R version 4.3.0 (2023-04-21 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 11 x64 (build 22621) Matrix products: default locale: [1] LC_COLLATE=Chinese (Simplified)_China.utf8 [2] LC_CTYPE=Chinese (Simplified)_China.utf8 [3] LC_MONETARY=Chinese (Simplified)_China.utf8 [4] LC_NUMERIC=C [5] LC_TIME=Chinese (Simplified)_China.utf8 time zone: Asia/Shanghai tzcode source: internal attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] reticulate_1.28 loaded via a namespace (and not attached): [1] compiler_4.3.0 here_1.0.1 Matrix_1.5-4.1 rprojroot_2.0.3 tools_4.3.0 [6] withr_2.5.0 rappdirs_0.3.3 Rcpp_1.0.10 grid_4.3.0 jsonlite_1.8.4 [11] png_0.1-8 lattice_0.21-8
  2. Python 版本 Python 3.9.16 (main, Mar 8 2023, 10:39:24)
  3. AKShare 版本 ak.version '1.10.11'
  4. 接口的名称和代码 公司股本变动-巨潮资讯 接口: stock_share_change_cninfo 目标地址: http://webapi.cninfo.com.cn/#/apiDoc 描述: 巨潮资讯-数据-公司股本变动 限量: 单次获取指定 symbol 在 start_date 和 end_date 之间的公司股本变动数据 输入参数
  5. 接口报错的截图或代码 r语言中:stock_share_change_cninfo_df = ak$stock_share_change_cninfo(symbol="002594", start_date="20091227", end_date="20220713") Error: KeyError: 'records' Python中: stock_share_change_cninfo_df = ak.stock_share_change_cninfo(symbol="002594", start_date="20091227", end_date="20220713") Traceback (most recent call last): File "", line 1, in File "C:\Users\roywei\AppData\Roaming\Python\Python39\site-packages\akshare\stock\stock_share_changes_cninfo.py", line 91, in stock_share_change_cninfo temp_df = pd.DataFrame(data_json["records"]) KeyError: 'records'
  6. 期望获得的正确结果 输出股本变动表。

感谢反馈问题,已修复该问题,升级到 AKShare 1.10.14 使用