Error when running samsungctl
See original GitHub issueHi, Thanks for continuing and improving samsungctl - I’m looking forward to the increased number of available keys. I am currently getting this error when running the c611b77 commit of master:
python -m samsungctl --host 192.168.123.203 --port 8002 --method websocket KEY_HDMI error from callback <bound method RemoteWebsocket.on_open of <samsungctl.remote_websocket.RemoteWebsocket object at 0xf68872b0>>: on_open() missing 1 required positional argument: 'ws' Traceback (most recent call last): File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/samsungctl/samsungctl/__main__.py", line 206, in <module> main() File "/samsungctl/samsungctl/__main__.py", line 181, in main with Remote(config) as remote: File "/samsungctl/samsungctl/remote.py", line 13, in __init__ self.remote = RemoteWebsocket(config) File "/samsungctl/samsungctl/remote_websocket.py", line 50, in __init__ self.open() File "/samsungctl/samsungctl/remote_websocket.py", line 124, in open raise RuntimeError('Connection Failure') RuntimeError: Connection Failure error from callback <bound method RemoteWebsocket.on_message of <samsungctl.remote_websocket.RemoteWebsocket object at 0xf68872b0>>: on_message() missing 1 required positional argument: 'message' ^CException ignored in: <module 'threading' from '/usr/local/lib/python3.6/threading.py'> Traceback (most recent call last): File "/usr/local/lib/python3.6/threading.py", line 1294, in _shutdown t.join() File "/usr/local/lib/python3.6/threading.py", line 1056, in join self._wait_for_tstate_lock() File "/usr/local/lib/python3.6/threading.py", line 1072, in _wait_for_tstate_lock elif lock.acquire(block, timeout): KeyboardInterrupt root@4ac25b2493d0:/samsungctl# cat ~/.samsungctl/token.txt root@4ac25b2493d0:/samsungctl#
The “error from callback <bound method RemoteWebsocket.on_open of <samsungctl.remote_websocket.RemoteWebsocket object at 0xf68872b0>>: on_open() missing 1 required positional argument: ‘ws’” error appears before allowing the device on the TV. The “error from callback <bound method RemoteWebsocket.on_message of <samsungctl.remote_websocket.RemoteWebsocket object at 0xf68872b0>>: on_message() missing 1 required positional argument: ‘message’” error appears after allowng the device on the TV. Nothing is being written to token.txt. I have tried with both python 2 and 3 and both exhibit the same issue, with 3 handling the crashes better.
TV info:
{"device":{"FrameTVSupport":"false","GamePadSupport":"true","ImeSyncedSupport":"true","OS":"Tizen","TokenAuthSupport":"true","VoiceSupport":"true","countryCode":"AU","description":"Samsung DTV RCR","developerIP":"0.0.0.0","developerMode":"0","duid":"uuid:f3955515-4088-483a-b1e5-d11a95d2a1a7","firmwareVersion":"Unknown","id":"uuid:f3955515-4088-483a-b1e5-d11a95d2a1a7","ip":"192.168.123.203","model":"17_KANTM_UHD","modelName":"UA65MU7000","name":"[TV] Samsung 7 Series (65)","networkType":"wired","resolution":"3840x2160","smartHubAgreement":"true","type":"Samsung SmartTV","udn":"uuid:f3955515-4088-483a-b1e5-d11a95d2a1a7","wifiMac":"68:27:37:e9:f9:02"},"id":"uuid:f3955515-4088-483a-b1e5-d11a95d2a1a7","isSupport":"{\"DMP_DRM_PLAYREADY\":\"false\",\"DMP_DRM_WIDEVINE\":\"false\",\"DMP_available\":\"true\",\"EDEN_available\":\"true\",\"FrameTVSupport\":\"false\",\"ImeSyncedSupport\":\"true\",\"TokenAuthSupport\":\"true\",\"remote_available\":\"true\",\"remote_fourDirections\":\"true\",\"remote_touchPad\":\"true\",\"remote_voiceControl\":\"true\"}\n","name":"[TV] Samsung 7 Series (65)","remote":"1.0","type":"Samsung SmartTV","uri":"http://192.168.123.203:8001/api/v2/","version":"2.0.25"}
Any help with this is greatly appreciated
EDIT for readability, pastebin link to info above
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (8 by maintainers)
nice little tip about posting the errors like that huh?? there is a whole slew of them
apache
bash
coffeescript
c++
c#
css
diff
http
ini
toml
java
javascript
json
makefile
markdown
nginx
objective-c
perl
php
powershell (ps)
properties
python
ruby
shell
sql
html
xml
yml
and I am sure there are more i just can’t think of them off hand
I’m a dum dum…
This is my boo boo. It is because I am checking for the sock object before i even initialized the WebsocketApp.
This will be repaired in a jif.