Ape / samsungctl

Remote control Samsung televisions via a TCP/IP connection
MIT License
711 stars 191 forks source link

No module named websocket #90

Open shakabra opened 5 years ago

shakabra commented 5 years ago

Hi guys, I have an issue using websocket with samsungctl:

samsungctl -i --host 192.168.2.100 --method websocket --port 8001

Traceback (most recent call last): File "/usr/local/bin/samsungctl", line 11, in sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/samsungctl/main.py", line 110, in main with Remote(config) as remote: File "/usr/local/lib/python2.7/dist-packages/samsungctl/remote.py", line 11, in init self.remote = RemoteWebsocket(config) File "/usr/local/lib/python2.7/dist-packages/samsungctl/remote_websocket.py", line 17, in init import websocket ImportError: No module named websocket

Someone can help me? Thanks!!

ejel commented 5 years ago

You need to have websocket-client package installed as a dependency (e.g. pip install websocket-client)

shakabra commented 5 years ago

Thank you very much! Now websocket seems working well, but I receive another error:

File "/usr/local/bin/samsungctl", line 11, in sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/samsungctl/main.py", line 110, in main with Remote(config) as remote: File "/usr/local/lib/python2.7/dist-packages/samsungctl/remote.py", line 11, in init self.remote = RemoteWebsocket(config) File "/usr/local/lib/python2.7/dist-packages/samsungctl/remote_websocket.py", line 30, in init self._read_response() File "/usr/local/lib/python2.7/dist-packages/samsungctl/remote_websocket.py", line 72, in _read_response raise exceptions.UnhandledResponse(response) samsungctl.exceptions.UnhandledResponse: {u'event': u'ms.channel.unauthorized'}

Any Idea? Thanks in advance

otinoff commented 2 years ago

Hi, i got the same, samsungctl.exceptions.UnhandledResponse: {u'event': u'ms.channel.unauthorized'} is it possible pass it too, or happiness was so close, but "No"?