When I run the following command to get the host ip:
socket.gethostbyname(socket.gethostname())
I am getting the following error on MAC terminal:
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
Any idea what the problem could be?
socket.gethostname() does return the correct hostname.
socket.gethostname().strip()?ping(from command line) the host thatsocket.gethostname()returns, does it sayunknown host?