mukulhase / WebWhatsapp-Wrapper

An API for sending and receiving messages over web.whatsapp [Working as of 18th May 2018]
https://webwhatsapi.readthedocs.io/en/latest/
MIT License
2.02k stars 796 forks source link

Error for read new messages #1185

Closed Fr4ncisTaylor closed 8 months ago

Fr4ncisTaylor commented 9 months ago

Waiting for QR Bot started Checking for more messages Traceback (most recent call last): File "D:\Documentos\dash rodrigo\jrmenssageria\teste.py", line 14, in for contact in driver.get_unread(): ^^^^^^^^^^^^^^^^^^^ File "D:\Documentos\dash rodrigo\jrmenssageria\webwhatsapi__init.py", line 424, in get_unread raw_message_groups = self.wapi_functions.getUnreadMessages( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Documentos\dash rodrigo\jrmenssageria\webwhatsapi\wapi_js_wrapper.py", line 45, in getattr__ wapi_functions = dir(self) ^^^^^^^^^ TypeError: 'NoneType' object is not iterable

ursr72 commented 8 months ago

How did you fix it? I have the same error

Fr4ncisTaylor commented 8 months ago

How did you fix it? I have the same error

Change webpackChunkbuild to webpackChunkwhatsapp_web_client in line 68 in webwhatsapi/js/wapi.js

ursr72 commented 8 months ago

Thanks for responding, I really appreciate it. My python code fails before it runs webwhatsapi\js\wapi.js.

After the command result = self.driver.execute_script( "if (document.querySelector('*[data-icon=chat]') !== null) { return true } else { return false }" result is False.

Any idea why? Could it be related to the fact that I'm not running it from a docker?

Thanks again!!!