I have installed SimpleWebSocketServer as per the instructions.
Using an exact copy of the SimpleWebSocketServer.py and websocket.html I get the following error:
Invalid handshake
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/websockets/handshake.py", line 85, in check_request
assert get_header('Upgrade').lower() == 'websocket'
AssertionError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/websockets/server.py", line 88, in handler
extra_headers=self.extra_headers,
File "/usr/local/lib/python3.5/dist-packages/websockets/server.py", line 437, in handshake
key = check_request(get_header)
File "/usr/local/lib/python3.5/dist-packages/websockets/handshake.py", line 93, in check_request
raise InvalidHandshake("Invalid request") from exc
websockets.exceptions.InvalidHandshake: Invalid request
Invalid handshake
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/websockets/handshake.py", line 85, in check_request
assert get_header('Upgrade').lower() == 'websocket'
AssertionError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/websockets/server.py", line 88, in handler
extra_headers=self.extra_headers,
File "/usr/local/lib/python3.5/dist-packages/websockets/server.py", line 437, in handshake
key = check_request(get_header)
File "/usr/local/lib/python3.5/dist-packages/websockets/handshake.py", line 93, in check_request
raise InvalidHandshake("Invalid request") from exc
websockets.exceptions.InvalidHandshake: Invalid request
What am I doing wrong?
Your help will be greatly appreciated
I have installed SimpleWebSocketServer as per the instructions. Using an exact copy of the SimpleWebSocketServer.py and websocket.html I get the following error:
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/websockets/server.py", line 88, in handler extra_headers=self.extra_headers, File "/usr/local/lib/python3.5/dist-packages/websockets/server.py", line 437, in handshake key = check_request(get_header) File "/usr/local/lib/python3.5/dist-packages/websockets/handshake.py", line 93, in check_request raise InvalidHandshake("Invalid request") from exc websockets.exceptions.InvalidHandshake: Invalid request Invalid handshake Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/websockets/handshake.py", line 85, in check_request assert get_header('Upgrade').lower() == 'websocket' AssertionError
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/websockets/server.py", line 88, in handler extra_headers=self.extra_headers, File "/usr/local/lib/python3.5/dist-packages/websockets/server.py", line 437, in handshake key = check_request(get_header) File "/usr/local/lib/python3.5/dist-packages/websockets/handshake.py", line 93, in check_request raise InvalidHandshake("Invalid request") from exc websockets.exceptions.InvalidHandshake: Invalid request