Skip to content

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

@Shasoosh

Description

@Shasoosh

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions