Exception while retriving IP Address


  • Exception while retriving IP Address,using local host IP address HTTPSConnectionPool(host='api.ipify.org', port=443): Max retries exceeded with url: / (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x0000025F814933D0>: Failed to resolve 'api.ipify.org' ([Errno 11001] getaddrinfo failed)"))


  • @DIYD2322 Sometime this External API gets in to trouble. Better to hardcode the IP in the code. This is for analytical purpose, but querying every time is overkill. So better to hardcode.