miguelgrinberg / simple-websocket

Simple WebSocket server and client for Python.
MIT License
79 stars 17 forks source link

wsproto.utilities.RemoteProtocolError: unrecognized subprotocol settings #36

Closed enjaxx closed 10 months ago

enjaxx commented 10 months ago

Environment:

Trying to connect to a custom server, I get the above error. My code:

ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
self.ws = simple_websocket.Client.connect(f"wss://{self._ip}/", ssl_context=ctx)

self._ip is just a regular local ip, the server is using a self signed certificate, so I have to create a custom ssl context. I'm not using any subprotocols...

miguelgrinberg commented 10 months ago

I need to see the complete stack trace of the error, please.

enjaxx commented 10 months ago

Sorry for bothering you, I've tested the code with a different library and it throws the same error. It seems to be a problem on the server side.