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

Can't auth with TV #130

Closed
elomeno opened this issue Nov 10, 2023 · 4 comments
Closed

Can't auth with TV #130

elomeno opened this issue Nov 10, 2023 · 4 comments

Comments

@elomeno
Copy link

elomeno commented Nov 10, 2023

DEBUG:getmac:Initializing 'ip4' method cache (platform: 'darwin')
DEBUG:getmac:Finished initializing 'ip4' method cache
DEBUG:getmac:Raw MAC found: b4:b2:91:c4:b3:4b
Traceback (most recent call last):
File "/opt/lgtv-venv/bin/lgtv", line 8, in
sys.exit(main())
^^^^^^
File "/opt/lgtv-venv/lib/python3.12/site-packages/LGTV/init.py", line 150, in main
ws.connect()
File "/opt/lgtv-venv/lib/python3.12/site-packages/ws4py/client/init.py", line 214, in connect
self.sock = ssl.wrap_socket(self.sock, **self.ssl_options)
^^^^^^^^^^^^^^^
AttributeError: module 'ssl' has no attribute 'wrap_socket'

@asebert-caue
Copy link

Can someone help us with the same issue ?

❯lgtv auth 194.107.100.42 mytv ssl
DEBUG:getmac:Initializing 'ip4' method cache (platform: 'darwin')
DEBUG:getmac:Finished initializing 'ip4' method cache
DEBUG:getmac:Raw MAC found: 80:5b:65:a5:f8:4
DEBUG:getmac:Length of MAC 80:5b:65:a5:f8:4 is 16, padding single-character octets with zeros
Traceback (most recent call last):
  File "/Users/asebert/.local/bin/lgtv", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/asebert/.local/pipx/venvs/lgtv/lib/python3.12/site-packages/LGTV/__init__.py", line 150, in main
    ws.connect()
  File "/Users/asebert/.local/pipx/venvs/lgtv/lib/python3.12/site-packages/ws4py/client/__init__.py", line 214, in connect
    self.sock = ssl.wrap_socket(self.sock, **self.ssl_options)
                ^^^^^^^^^^^^^^^
AttributeError: module 'ssl' has no attribute 'wrap_socket'

@steelsnake
Copy link

Unfortunately this is due to a change in Python3 - it requires a code change. I'm not proficient in Python, but if anyone wants to have a gander, look at this post: eventlet/eventlet#795 (comment)

@klattimer
Copy link
Owner

This isn't a problem with LGTV, it's a problem with ws4py.

Upstream issue appears to be tracked here: Lawouach/WebSocket-for-Python#262

@tonissssssss8eses
Copy link

Try:
lgtv --ssl auth 194.107.100.42 mytv

Work for me. Ubuntu Linux

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

5 participants