[Errno 8] nodename nor servname provided, or not known
Opened this issue · 2 comments
Shasoosh commented
Hey,
I've installed the latest version using pipx and getting this:
lgtv --name OLED42 --ssl swInfo
Traceback (most recent call last):
File "/Users/user/.local/bin/lgtv", line 10, in <module>
sys.exit(main())
^^^^^^
File "/Users/user/Library/Application Support/pipx/venvs/lgtv/lib/python3.11/site-packages/LGTV/__init__.py", line 186, in main
ws = LGTVRemote(name, **config[name], ssl=args.ssl)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/Library/Application Support/pipx/venvs/lgtv/lib/python3.11/site-packages/LGTV/remote.py", line 52, in __init__
self.__ip = socket.gethostbyname(self.__hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
Removing this code from remote.py
fixes it for me (not sure if this is a good approach, though:
if self.__hostname is not None:
# Over ride IP address when we know the hostname
self.__ip = socket.gethostbyname(self.__hostname)
klattimer commented
Could you dump your config.json?
jgenunez commented
I have the same issue. When I do sudo killall -HUP mDNSResponder,
everything returns to normal.