Closed tbdsilva closed 1 year ago
By the way. I am running it on macbook.
It worked on python 3.11
Now i am getting this error:
python wpp.py
Scan the QR code with your phone to log in.
WhatsApp Web is ready!
Exception in thread Thread-2 (_on_message):
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/whatsappy/whatsapp.py", line 257, in _on_message
last_check = self.unread_messages
^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/whatsappy/whatsapp.py", line 148, in unread_messages
return [UnreadMessage(self, element) for element in self.driver.find_elements(By.XPATH, Selectors.UNREAD_CONVERSATIONS_XPATH)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/whatsappy/whatsapp.py", line 148, in
I had to put a time.sleep() to work.
Hi, the first error is because it only works in Python 3.11. Thank you for showing the solution to the second error, I'll try to find a faster approach and implement it. I'll keep the issue open for now.
Thanks Italo. I just sent you an email right now. If you have any time to read and reply i appreciate it! <3
I had to put a time.sleep() to work.
I had to put a time.sleep() to work.
where?
I had to put a time.sleep() to work.
I had to put a time.sleep() to work.
where?
I don't know if the repository still works after the new update, I haven't been active in this repository in a while. I'll have to test it
Hello I tried to run the example code and it gave me the follow error:
% python wpp.py
from whatsappy import Whatsapp
File "/usr/local/lib/python3.9/site-packages/whatsappy/init.py", line 1, in
from .main import Whatsapp
File "/usr/local/lib/python3.9/site-packages/whatsappy/main.py", line 590
match __name:
^
SyntaxError: invalid syntax
Traceback (most recent call last): File "/Users/thyagosilva/Desktop/wpp.py", line 1, in