-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
尝试获取FR007利率互换数据,但总是报错。已使用最新的AkShare及Python 3.14。
ValueError: Length mismatch: Expected axis has 0 elements, new values have 17 elements
temp = ak.macro_china_swap_rate(start_date="2020-09-06", end_date="2020-10-06")
Traceback (most recent call last):
File "C:\Users\storage\ak_env\Lib\site-packages\requests\models.py", line 976, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\storage\AppData\Local\Programs\Python\Python314\Lib\json_init_.py", line 352, in loads
return _default_decoder.decode(s)
File "C:\Users\storage\AppData\Local\Programs\Python\Python314\Lib\json\decoder.py", line 345, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\storage\AppData\Local\Programs\Python\Python314\Lib\json\decoder.py", line 363, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
temp = ak.macro_china_swap_rate(start_date="2020-09-06", end_date="2020-10-06")
File "C:\Users\storage\ak_env\Lib\site-packages\akshare\bond\bond_china_money.py", line 242, in macro_china_swap_rate
data_json = r.json()
File "C:\Users\storage\ak_env\Lib\site-packages\requests\models.py", line 980, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)