Jump to content

Recommended Posts

Posted

Hello,

I wrote a Python 2 script, getting information from an API. Therefore I wrote those lines of code:

try: data = requests.get("https://api.luftdaten.info/v1/sensor")except Exception as e: send(str(e))

Unfortunately I get the following Error: hostname 'api.luftdaten.info' doesn't match 'adserve.gim-verlag.de'(The function send(text) sends to error via a chat messenger to me.) I did import the requests module.When I run the script locally everything works fine. Do you know, why it doesn't work?

GreetingsLucas Hild

Guest
This topic is now closed to further replies.
×
×
  • Create New...