My TeaMaster9001 is running on my IoT network, and it has an IP address of 172.16.1.10
. Whenever I send a GET request in Python 3.9.5
, I get a requests.exceptions.HTTPError
.
Here is my code (brew-coffee.py
):
import requests
response = requests.get("http://172.16.1.10/brew-coffee")
response.raise_for_status()
print(response.content)
...and here is the output:
Traceback (most recent call last):
File "C:\Users\perzan\scripts\brew-coffee.py", line 5, in <module>
response.raise_for_status()
File "C:\Users\perzan\scripts\scripts-env\lib\site-packages\requests\models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 418 Client Error: I'M A TEAPOT for url: http://172.16.1.10/brew-coffee
What is going on? Does the TeaMaster9001 not support brewing coffee? Is it something with my code? I think I may be missing some dependencies...