I created a simple script just to test this function but after the remove_participant_group command is executed, it removes the participant, but freezes the script and does not execute anything else. Does anyone use this function?
ps: no terminal error occurs
I guess that the selenium callback functions was not called property, so you will have a python freeze until the selenium callback timeout was raised. Try to check the implementation of that function in the JS layer and see if you find the problem
I guess that the selenium callback functions was not called property, so you will have a python freeze until the selenium callback timeout was raised. Try to check the implementation of that function in the JS layer and see if you find the problem
Thanks for your reply ... I really believe it's something related to what you said. but I don't know much about JS.
but I am having these 2 recurring problems:
first occurs this:
raise JsException("Error in function {0} ({1}). Command: {2}".format(self.function_name, e.msg, command))
webwhatsapi.wapi_js_wrapper.JsException: Error in function sendMessage (Timed out after 500000 ms). Command: return WAPI.sendMessage
this problem above occurs after passing the 500000ms described in the error, it really seems to be related to what you said
Then this error occurs if I terminate the script manually:
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=34507): Max retries exceeded with url: /session/91444aa0-53c3-4440-b739-1cabf5068fcd/execute/async (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f08a45096d8>: Failed to establish a new connection: [Errno 111] Connection refused',))
could you please, if not bother at least tell me why this error so i can look for the solution? is really out of my knowledge about selenium and JS
did you find a solution ?
did you find a solution ?
after a few attempts i managed to execute the js function that removes someone from the group. it looked like this:
chatid = message.chat_id['_serialized']
sender = message.sender.id
code = "WAPI.removeParticipantGroup('"+chatid+"', '"+sender+"')"
driver.driver.execute_script(script=code)
I created a bot that automatically removes participants who send links from other groups in the chat and I'm using this function and it's working well
thanks @erickythierry