Why am I getting this error in Python using the requests and json modules? -


i've been trying process couple thousand requests in python , write them json file. reason whenever run code, following error:

file "c:\program files (x86)\wing ide 101 5.1\src\debug\tserver\_sandbox.py", line 133, in <module> file "c:\program files (x86)\wing ide 101 5.1\src\debug\tserver\_sandbox.py", line 44, in main file "e:\python programs\api challenge aug 2015\api challenge files\execute requests files\riotapi.py", line 112, in get_match_by_matchid  return self._request(api_url, region) file "e:\python programs\api challenge aug 2015\api challenge files\execute requests files\riotapi.py", line 58, in _request  return response.json() file "c:\python\lib\site-packages\requests\models.py", line 819, in json  return json.loads(self.text, **kwargs) file "c:\python\lib\json\__init__.py", line 318, in loads  return _default_decoder.decode(s) file "c:\python\lib\json\decoder.py", line 343, in decode  obj, end = self.raw_decode(s, idx=_w(s, 0).end()) file "c:\python\lib\json\decoder.py", line 361, in raw_decode  raise valueerror(errmsg("expecting value", s, err.value)) none builtins.valueerror: expecting value: line 1 column 1 (char 0) 

note error occur after seemingly random number of requests. it'll happen after under 10 requests, it'll last couple hundred requests before error occurs. i've exhaustively tried , hasn't broken after same number of requests once.

the files i'm using cause error identical in method post can see here: what doing wrong requests in python: valueerror: expecting value: line 1 column 1 (char 0)?

i believe error comes same issue you'll find in thread, far can tell , answer never found. can me issue?


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -