[Python] Error: Max retries exceeded with url

Hello,

I noticed this morning that my Python Docker had disabled itself because an unexpected error had occurred. According to the log, I get the following error message:

HTTPSConnectionPool(host='api.binance.com', port=443): Max retries exceeded with url: /api/v3/[WHAT EVER] (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001E522160D10>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed'))

According to my database, where I store the data, the last query took place at “2024-07-11 00:01:22” (timezone: Europe/Vienna) and has not worked since then. I was sleeping at the time and there were no updates on my side.

At first I thought that my IP might have been blocked, even though my script had been running for months. So I even tried it on my smartphone and on my neighbor’s WiFi… same error message.

Even a simple script like this one doesn´t work anymore.

import requests

def ping_binance():
    url = 'https://api.binance.com/api/v3/ping'
    response = requests.get(url)
    
    # Check if the response status code is 200 (OK)
    if response.status_code == 200:
        return "PING successful"
    else:
        return f"PING failed: {response.status_code}"

print(ping_binance())

It´s funny that I still can fetch the data with a JS .