cmer / lg-tv-control-macos

Automatically wake/sleep and change the input of your LG TV when used as a monitor on macOS
129 stars 13 forks source link

Trouble getting hostname #16

Closed aaronkjones closed 1 year ago

aaronkjones commented 1 year ago

I don't think this is specific to this script, but on MacOS Ventura 13.2.1 (22D68) I am getting the following error. I will provide more details as I work them out.

❯ lgtv MyTV swInfo ssl
Traceback (most recent call last):
  File "/Users/lka/opt/lgtv/bin/lgtv", line 33, in <module>
    sys.exit(load_entry_point('LGTV==0.3', 'console_scripts', 'lgtv')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lka/opt/lgtv/lib/python3.11/site-packages/LGTV/__init__.py", line 176, in main
    ws = LGTVRemote(name, **config[name], ssl=len(sys.argv)>=4 and sys.argv[3]=="ssl")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lka/opt/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
aaronkjones commented 1 year ago

This issue is due to work endpoint security or something related.