Error while closing the websocket connection


  • Hi,

    I am facing an error while closing the websocket connection.

    "__on_close() takes 2 positional arguments but 4 were given."

    Could someone please help with this issue?


  • @admin I think there is some issue with the __on_close function which was causing this error. In the function definition I added 2 additional arguments a and b as shown below. This fixed the error I was getting while closing the connection using ss.ws.close().

    23474fa1-a05c-47fe-ac62-49d07f52c2a9-image.png

    Kindly look into it.