Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Errno 8] nodename nor servname provided, or not known #154

Open
Shasoosh opened this issue Jan 22, 2024 · 2 comments
Open

[Errno 8] nodename nor servname provided, or not known #154

Shasoosh opened this issue Jan 22, 2024 · 2 comments

Comments

@Shasoosh
Copy link

Shasoosh commented Jan 22, 2024

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
Copy link
Owner

Could you dump your config.json?

@jgenunez
Copy link

I have the same issue. When I do sudo killall -HUP mDNSResponder, everything returns to normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants