1

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...

Perzan
  • 15
  • 1
  • 3
  • If you had Googled this you would have got *The HTTP 418 I'm a teapot client error response code indicates that the server refuses to brew coffee because it is, permanently, a teapot. A combined coffee/tea pot that is temporarily out of coffee should instead return 503. This error is a reference to Hyper Text Coffee Pot Control Protocol defined in April Fools' jokes in 1998 and 2014.* – BoarGules Jun 14 '21 at 18:28

0 Answers0