1. 程式人生 > >JSONDecodeError: Expecting value: line 1 column 1 (char 0)

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

JSONDecodeError Traceback (most recent call last) <ipython-input-8-c6de33151325> in <module>() 11 url_visit='http://kuaidi100.com/query?type=shentong&postid={}'.format(postid) 12 crawl_content=urlrequest.urlopen(url_visit).read() ---> 13json_content=
json.loads(crawl_content.decode("utf8")) 14 i=0 15 for i in 10: ~\AppData\Local\conda\conda\envs\course_py35\lib\json\__init__.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) 317 parse_int is None and parse_float is
None and 318 parse_constant is None and object_pairs_hook is None and not kw): --> 319return _default_decoder.decode(s) 320 if cls is None: 321 cls = JSONDecoder ~\AppData\Local\conda\conda\envs\course_py35\lib\json\decoder.py in decode(self, s, _w) 337 338
""" --> 339obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 340 end = _w(s, end).end() 341 if end != len(s): ~\AppData\Local\conda\conda\envs\course_py35\lib\json\decoder.py in raw_decode(self, s, idx) 355 obj, end = self.scan_once(s, idx) 356 except StopIteration as err: --> 357raise JSONDecodeError("Expecting value", s, err.value) from None 358 return obj, end JSONDecodeError: Expecting value: line 1 column 1 (char 0)