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

issue of stock_individual_spot_xq interface #5384

Closed
chenyu-vmware opened this issue Nov 29, 2024 · 1 comment
Closed

issue of stock_individual_spot_xq interface #5384

chenyu-vmware opened this issue Nov 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@chenyu-vmware
Copy link

with latest akshare version, looks stock_individual_spot_xq can't work as expected, please help to check.

C:\Users\tester\akshare>python3
Python 3.12.7 (tags/v3.12.7:0b05ead, Oct 1 2024, 03:06:41) [MSC v.1941 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import akshare as ak
data = ak.stock_individual_spot_xq(symbol="SZ300760")
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\chenyu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\akshare\stock\stock_xq.py", line 101, in stock_individual_spot_xq
temp_df = pd.json_normalize(json_data["data"]["quote"])
~~~~~~~~~^^^^^^^^
KeyError: 'data'

@chenyu-vmware chenyu-vmware added the bug Something isn't working label Nov 29, 2024
@albertandking
Copy link
Collaborator

with latest akshare version, looks stock_individual_spot_xq can't work as expected, please help to check.

C:\Users\tester\akshare>python3 Python 3.12.7 (tags/v3.12.7:0b05ead, Oct 1 2024, 03:06:41) [MSC v.1941 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

import akshare as ak
data = ak.stock_individual_spot_xq(symbol="SZ300760")
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\chenyu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\akshare\stock\stock_xq.py", line 101, in stock_individual_spot_xq
temp_df = pd.json_normalize(json_data["data"]["quote"])

KeyError: 'data'

已修复,升级到 AKShare 1.15.37 使用

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