We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 版本是最新的
pip install akshare --upgrade # Python 版本需要大于等于 3.8
描述遇到的问题
--------------------------------------------------------------------------- JSONDecodeError Traceback (most recent call last) File /opt/conda/lib/python3.11/site-packages/requests/models.py:971, in Response.json(self, **kwargs) 970 try: --> 971 return complexjson.loads(self.text, **kwargs) 972 except JSONDecodeError as e: 973 # Catch JSON-related errors and raise as requests.JSONDecodeError 974 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError File /opt/conda/lib/python3.11/site-packages/simplejson/__init__.py:514, in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, use_decimal, allow_nan, **kw) 510 if (cls is None and encoding is None and object_hook is None and 511 parse_int is None and parse_float is None and 512 parse_constant is None and object_pairs_hook is None 513 and not use_decimal and not allow_nan and not kw): --> 514 return _default_decoder.decode(s) 515 if cls is None: File /opt/conda/lib/python3.11/site-packages/simplejson/decoder.py:386, in JSONDecoder.decode(self, s, _w, _PY3) 385 s = str(s, self.encoding) --> 386 obj, end = self.raw_decode(s) 387 end = _w(s, end).end() File /opt/conda/lib/python3.11/site-packages/simplejson/decoder.py:416, in JSONDecoder.raw_decode(self, s, idx, _w, _PY3) 415 idx += 3 --> 416 return self.scan_once(s, idx=_w(s, idx).end()) JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: JSONDecodeError Traceback (most recent call last) Cell In[23], line 2 1 import akshare as ak ----> 2 ak.index_detail_hist_cni(symbol = '399101',date = '202404') 3 #ak.index_detail_hist_cni(symbol='399005', date='202201') File /opt/conda/lib/python3.11/site-packages/akshare/index/index_cni.py:197, in index_detail_hist_cni(symbol, date) 190 params = { 191 'indexcode': symbol, 192 'dateStr': '-'.join([date[:4], date[4:]]), 193 'pageNum': '1', 194 'rows': '50000', 195 } 196 r = requests.get(url, params=params) --> 197 data_json = r.json() 198 temp_df = pd.DataFrame(data_json['data']['rows']) 199 temp_df.columns = [ 200 '-', 201 '-', (...) 210 '-', 211 ] File /opt/conda/lib/python3.11/site-packages/requests/models.py:975, in Response.json(self, **kwargs) 971 return complexjson.loads(self.text, **kwargs) 972 except JSONDecodeError as e: 973 # Catch JSON-related errors and raise as requests.JSONDecodeError 974 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError --> 975 raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The text was updated successfully, but these errors were encountered:
今天上午使用:ak.index_detail_hist_cni(symbol = '399101',date = '202404'),已经可以读取数据,不知何故。 今天下午又出错了。
ak.index_detail_hist_cni(symbol = '399101',date = '202404')
Sorry, something went wrong.
4. 399101
控制访问的频率
No branches or pull requests
遇到任何问题,请先确认您的 AKShare 版本是最新的
描述遇到的问题
当使用:ak.index_detail_hist_cni(symbol = '399101',date = '202404'),获取399101指数的04月样本数据时,报错。
The text was updated successfully, but these errors were encountered: