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 #1085

Open m0binasadi opened 2 years ago

m0binasadi commented 2 years ago

app = WhatsAPIDriver("chromedriver.exe") File "C:\Users\pardaz_Rayan\AppData\Local\Programs\Python\Python39\lib\site-packages\webwhatsapi-2.0.3-py3.9.egg\webwhatsapi__init.py", line 285, in init__ self.driver.set_script_timeout(500) AttributeError: 'NoneType' object has no attribute 'set_script_timeout'

erm3nda commented 2 years ago

TLDR; You're using it wrong ...

self.driver.set_script_timeout(500) has no set_script_timeout because self.driver is None.

Means, the driver itself has not been created and probably browser is not even up.

Just seeing app = WhatsAPIDriver("chromedriver.exe") I bet that you didn't even read the readme to learn how to use. You dont pass the exe name to that function, but you can try with "chrome", the class WhatsApiDriver tries to call the Chrome browser using chromedriver.exe by itself.