Comments (1)
macro_china_bond_public接口异常, 报错如下: JSONDecodeError Traceback (most recent call last) File c:\Users\sjyt00001\miniconda3\lib\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 c:\Users\sjyt00001\miniconda3\lib\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 c:\Users\sjyt00001\miniconda3\lib\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 c:\Users\sjyt00001\miniconda3\lib\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) File c:\Users\sjyt00001\miniconda3\lib\site-packages\akshare\bond\bond_china_money.py:111, in bond_china_close_return_map() 110 r = requests.get(url, headers=headers) --> 111 data_json = r.json() 112 except: # noqa: E722
File c:\Users\sjyt00001\miniconda3\lib\site-packages\requests\models.py:975, in Response.json(self, **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)
During handling of the above exception, another exception occurred:
JSONDecodeError Traceback (most recent call last) File c:\Users\sjyt00001\miniconda3\lib\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 c:\Users\sjyt00001\miniconda3\lib\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 c:\Users\sjyt00001\miniconda3\lib\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 c:\Users\sjyt00001\miniconda3\lib\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[51], line 4 1 import akshare as ak 3 # 新债发行 ----> 4 macro_china_bond_public_df = ak.macro_china_bond_public() 5 macro_china_bond_public_df
File c:\Users\sjyt00001\miniconda3\lib\site-packages\akshare\bond\bond_china_money.py:312, in macro_china_bond_public() 305 def macro_china_bond_public() -> pd.DataFrame: 306 """ 307 **-债券信息披露-债券发行 308 https://www.chinamoney.com.cn/chinese/xzjfx/ 309 :return: 债券发行 310 :rtype: pandas.DataFrame 311 """ --> 312 bond_china_close_return_map() 313 url = "https://www.chinamoney.com.cn/ags/ms/cm-u-bond-an/bnBondEmit" 314 headers = { 315 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) " 316 "Chrome/81.0.4044.138 Safari/537.36", 317 }
File c:\Users\sjyt00001\miniconda3\lib\site-packages\akshare\bond\bond_china_money.py:115, in bond_china_close_return_map() 113 session = __bond_register_service() 114 r = session.get(url, headers=headers) --> 115 data_json = r.json() 116 temp_df = pd.DataFrame(data_json["records"]) 117 return temp_df
File c:\Users\sjyt00001\miniconda3\lib\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)
已修复,升级到 AKShare 1.14.4 使用
from akshare.
Related Issues (20)
- AKShare 接口问题报告 HOT 1
- AKShare 接口问题报告 HOT 1
- 历史股票日线数据请求输出preclose HOT 1
- 接口问题报告,stock_intraday_em() HOT 2
- AKShare 接口问题报告:option_lhb_em HOT 1
- fund_etf_hist_em 接口异常 HOT 1
- AKShare 接口问题报告 HOT 1
- AKShare 接口问题报告 HOT 1
- option_comm_info error HOT 1
- AKShare 接口问题报告
- AKShare 接口问题报告 HOT 1
- AKShare 接口问题报告 HOT 2
- AKShare 接口问题报告 HOT 4
- AKShare 接口问题报告 HOT 1
- AKShare 接口问题报告 HOT 1
- CentOS 7.9安装失败 HOT 2
- AKShare 接口问题报告 HOT 2
- AKShare 接口问题报告 HOT 1
- 同花顺 - 概念板块系列接口不再提供? HOT 1
- etf的历史溢价数据 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from akshare.