'AttributeError: 'Response' object has no attribute 'txt'
I am working with the chuck norris api and I keep getting an attribute error saying response object has no txt.
the code I wrote for it is fairly simple so I am not sure where I am going wrong
def chuck_norris():
response = requests.get("https://api.chucknorris.io/jokes/random")
jsonData = json.loads(response.text)
print(jsonData["value"]["joke"])
return
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
