whatsapp-web-graph icon indicating copy to clipboard operation
whatsapp-web-graph copied to clipboard

Arguments mismatch - on_close()

Open kathir-t opened this issue 4 years ago • 1 comments

The error:

[2021-06-15 22:54:29,341] {_logging.py:61} - error from callback <function WhatsApp.connect.. at 0x7f9e55f82700>: on_close() takes 1 positional argument but 2 were given

The cause:

In Client.py L292 , ws is passed as a parameter to the on_close() method, whilst the actual method does not need it.

kathir-t avatar Jun 15 '21 17:06 kathir-t

You are right, but need to add ws to the function argument, as python library passes it while calling.

shashwat001 avatar Jun 25 '21 04:06 shashwat001