Ape / samsungctl

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

[WinError 10035] A non-blocking socket operation could not be completed immediately #63

Closed steven-hack closed 6 years ago

steven-hack commented 6 years ago

Hi,

When i try to run the sample on a windows machine (Windows 10, python 3.6 64-bit) i get the following error:

File "sample.py" line 16, in with samsungctl.Remote(config) as remote: File "C:\Program Files\Python36\lib\site-packages\samsungctl\remote.py", line 10, in init self.remote = RemoteWebsocket(config) File "C:\Program Files\Python36\lib\site-packages\samsungctl\remote_websocket.py", line 22, in init self._serialize_string(config["name"])), config["timeout"]) File "C:\Program Files\Python36\lib\site-packages\websocket_core.py", line 487, in create_connection websock.connect(url, **options) File "C:\Program Files\Python36\lib\site-packages\websocket_core.py", line 211, in connect options.pop('socket', None)) File "C:\Program Files\Python36\lib\site-packages\websocket_http.py", line 71, in connect sock = _open_socket(addrinfo_list, options.sockopt, options.timeout) File "C:\Program Files\Python36\lib\site-packages\websocket_http.py", line 114, in _open_socket sock.connect(address) BlockingIOError: [WinError 10035] A non-blocking socket operation could not be completed immediately

Any idea what the issue could be? Python is not my really my programming language so I have no idea where to start solving this issue myself.

RedsGT commented 6 years ago

Set the timeout value to something higher than 0.

Ape commented 6 years ago

Can you test this again with 0.7.1?

Ape commented 6 years ago

This should be fixed, but let's reopen if this still occurs for you.