Closed urb31075 closed 2 years ago
Put quotation marks around the port. It worked for me.
PORT=9001
server = WebsocketServer(PORT)
the bug is here (line 21,22). plz change it into:
PORT=9001
server = WebsocketServer(port=PORT)
maybe I'll pull request to solve it.
Solved. Fix will be included in next release.
urb@san:~/python-websocket-server$ python3 server.py Traceback (most recent call last): File "server.py", line 22, in
server = WebsocketServer(PORT)
File "/home/urb/python-websocket-server/websocket_server/websocket_server.py", line 117, in init
TCPServer.init(self, (host, port), WebSocketHandler)
File "/usr/lib/python3.8/socketserver.py", line 452, in init
self.server_bind()
File "/usr/lib/python3.8/socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
TypeError: str, bytes or bytearray expected, not int