[issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS

Ronald Oussoren report at bugs.python.org
Thu Dec 13 04:54:45 EST 2018


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

>>My gut feeling is that this is some issue with your system or environment.

> I Doubt it, happens with another MacBook air which is literally out of the box, no mods.

But on the other hand most other users (including myself and Ned) don't have this problem. 

> >- Does the result of socket.gethostname() look sane? In particular, does this include a domain name?
> it is given a name that includes the ip address and the name of the router. 

Does resolving that name work? If it doesn't that points to a problem with your environment. 

What's the result of resolving the IP address of your system? That name gets used by the system when available, and that could explain the issue your seeing.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35164>
_______________________________________


More information about the Python-bugs-list mailing list