I'm getting the following error message:
...File "c:\users\dockerhost\appdata\local\programs\python\python37\Lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I'm attempting to use requests to get the response headers. I've done a lot of research on trying to resolve the jsondecodeerror. However, I'm not finding a solution.
import requests
request.get('https://www.google.com/').json()
Error message.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Host\.virtualenvs\projects08-8iyGSYl4\lib\site-packages\requests\models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "c:\users\host\appdata\local\programs\python\python37\Lib\json\__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "c:\users\host\appdata\local\programs\python\python37\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "c:\users\host\appdata\local\programs\python\python37\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)