#python
Вопрос:
def Summary(Boby):
list__ = ('2','3','4','5','6','7','8')
value = random.choice(list__)
path = "D:\avengers\J.A.R.V.I.S\Space Images\" str(value) ".jpg"
os.startfile(path)
name = str(Boby)
url = "https://hubblesite.org/api/v3/glossary/" str(name)
r = requests.get(url)
Data = r.json()
if len(Data) != 0:
retur = Data['definition']
speak(f"According To The Nasa : {retur}")
else:
Speak("No Data Available , Try Again Later!")
и это ошибка
File "c:pythonPython38libjsondecoder.py", line 355, in raw_decode#
raise JSONDecodeError("Expecting value", s, err.value) from None``
json.decoder.JSONDecodeError: Expecting value: line 3 column 1 (char 2)
Комментарии:
1. что там внутри
r.content
? очевидно, недопустимый json