When I run this bit of code:
import socket
domainName = 'test.domain.io'
old_ip = socket.gethostbyname(domainName)
print(old_ip)
I get this error in PyCharm: "File "C:/Users/UserName/PycharmProjects/AddyGet/ThingstoTry.py", line 5, in old_ip = socket.gethostbyname(domainName) socket.gaierror: [Errno 11001] getaddrinfo failed"
When I point the debugger at line 5, I see the following errors:
"ret.metadata= {NameError}name 'ret' is not defined"
"route53= {NameError}name 'route53' is not defined"
"zone= {NameError}name 'zone' is not defined"
"zone= {NameError}name 'zone' is not defined"
"route53.connection= {NameError}name 'route53' is not defined"
The domain is hosting on route53, but I'm not importing route53 because I didn't think I would need to just to retrieve an IP address. So, do I need to be importing route53 and working with route53 methods just to get this IP address? Any insights would be greatly appreciated.
Also worth mentioning, because it's a "socket.gaierror", I tried the solutions here: "getaddrinfo failed", what does that mean?
I am not behind a firewall (I disabled Window's firewall). There are no proxy environmental variables by default on my system, and putting myself behind a proxy also didn't help.