LGWebOSRemote icon indicating copy to clipboard operation
LGWebOSRemote copied to clipboard

SSL has no wrap_socket

Open Inginn opened this issue 1 year ago • 3 comments

Hello. I am runnig Arch with python 3.12.3-1 I am getting a error when trying to auth with my tv I think this a problem with Python 3.12 changes to ssl but I dont have a clue how to fix this.

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 137, 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'

Inginn avatar May 31 '24 17:05 Inginn

+1 to this, it's now blocking the use of the app. It seems Python has changed something and applications need to adapt.

erenoglu avatar Jun 11 '24 17:06 erenoglu

LGWebOSRemote has an inherent issue here because the web socket dependency being used hasn't been updated since 2018, so it hasn't been updated with compatibility with Python 3.12 in mind.

I've been working on an alternative CLI for managing LG TVs which uses a different web socket library which does work with Python 3.12+. It doesn't have all the functionality LGWebOSRemote has but it might work for your needs: https://github.com/Tenzer/alga.

Tenzer avatar Jun 15 '24 22:06 Tenzer

Thanks @Tenzer , I started using your version and it works well. But I missed screenOff function, so I created a feature request.

erenoglu avatar Jun 16 '24 20:06 erenoglu

Closed by #183

klattimer avatar Aug 17 '25 09:08 klattimer