Ape / samsungctl

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

socket.error: [Errno 115] Operation now in progress #69

Closed dragouf closed 6 years ago

dragouf commented 6 years ago

When I try this command on a raspberry pi :

samsungctl --host 192.168.1.18 --port 8001 --method websocket --name myremote KEY_SOURCE

I get this result :

Traceback (most recent call last):
  File "/usr/local/bin/samsungctl", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/samsungctl/__main__.py", line 105, in main
    with Remote(config) as remote:
  File "/usr/local/lib/python2.7/dist-packages/samsungctl/remote.py", line 10, in __init__
    self.remote = RemoteWebsocket(config)
  File "/usr/local/lib/python2.7/dist-packages/samsungctl/remote_websocket.py", line 22, in __init__
    self._serialize_string(config["name"])), config["timeout"])
  File "/usr/local/lib/python2.7/dist-packages/websocket/_core.py", line 487, in create_connection
    websock.connect(url, **options)
  File "/usr/local/lib/python2.7/dist-packages/websocket/_core.py", line 211, in connect
    options.pop('socket', None))
  File "/usr/local/lib/python2.7/dist-packages/websocket/_http.py", line 71, in connect
    sock = _open_socket(addrinfo_list, options.sockopt, options.timeout)
  File "/usr/local/lib/python2.7/dist-packages/websocket/_http.py", line 114, in _open_socket
    sock.connect(address)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 115] Operation now in progress

any idea why ?

Ape commented 6 years ago

Please try with Python 3.

dragouf commented 6 years ago

I added a timeout and it works without python 3 :)