Open in06khattab opened 5 years ago
Hi @in06khattab
It appeared that latest websocket-client (currently 0.55) is not compatible and need to use older version (0.48 or before) with current sample code.
Following Python sample instruction need to be changed.
https://github.com/Logitech/logi_craft_sdk/tree/master/samples/CraftPython
NG: pip3 install websocket-client
OK: pip3 install websocket-client==0.48
If it is already installed, you can uninstall as following command. pip3 uninstall websocket-client
Please try again with older websocket-client
I still receive 403 forbidden with websocket-client version 0.48. Any other suggestions?
I could not get the examples or my own code working using the websocket library but switching to the websockets library the api works fine. I suspect it has something to do with the ssl connection but im not sure.
Sample Python executable is not working. I receive Error 403 Forbidden
The Sample C# app works fine.
This is what the manifest file looks like:![image](https://user-images.githubusercontent.com/6354007/52533335-402bcf00-2d2a-11e9-990d-de7f067c2530.png)
The Python SDK sample is installed correctly in Logitech options:![image](https://user-images.githubusercontent.com/6354007/52533346-71a49a80-2d2a-11e9-92d9-9f976878ddc6.png)
This is what it looks like when I run the craft.exe application:![image](https://user-images.githubusercontent.com/6354007/52533344-5e91ca80-2d2a-11e9-93fa-143410e2e01b.png)
This is the error that I receive: `Slider receives focus Traceback (most recent call last): File "craft.py", line 323, in sliderFocus File "craft.py", line 338, in changeTool NameError: name 'ws' is not defined connect called... --- request header --- GET / HTTP/1.1 Upgrade: websocket Connection: Upgrade Host: 127.0.0.1:10134 Origin: http://127.0.0.1:10134 Sec-WebSocket-Key: tQzh2ylSomgH/2IhqVtt3Q== Sec-WebSocket-Version: 13
--- response header --- HTTP/1.1 403 Forbidden Server: WebSocket++/0.7.0
error from callback <bound method CraftClient.on_close of <main.CraftClient object at 0x03199130>>: on_close() missing 1 required positional argument: 'ws' File "site-packages\websocket_app.py", line 343, in _callback ComboBox receives focus Traceback (most recent call last): File "craft.py", line 313, in comboBoxFocus File "craft.py", line 338, in changeTool File "site-packages\websocket_app.py", line 155, in send websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed. ComboBox receives focus Traceback (most recent call last): File "craft.py", line 313, in comboBoxFocus File "craft.py", line 338, in changeTool File "site-packages\websocket_app.py", line 155, in send websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed.`