Closed anabis closed 3 years ago
run: python3 whatsapp-web/chat.py name
Remember install selenium for python3
pip3 install selenium
hi , i have this error .
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
C:\chat>chat.py robinsonmas
Traceback (most recent call last):
File "C:\chat\chat.py", line 243, in
""""""""""""""""""""""""""""""""""""""""""""
any posible solution , ?>
Thanks for your help .
The HOME environment variable is not available on Windows.
As a workaround, you can either comment out these 3 lines from chat.py
chrome_data_dir_directory = "{0}/.chrome/data_dir/whatsapp_web_cli".format(os.environ['HOME'])
if not os.path.exists(chrome_data_dir_directory):
os.makedirs(chrome_data_dir_directory)
This would remove the functionality of auto sign-in and you would have to scan the QR code everytime you run the script.
Alternatively, you can look at this solution to figure out how to access the USERPROFILE variable as described here
I don't have access to a Windows machine at the moment. Let me know how it goes
It works after commenting the lines 249 & 250. I know nothing about python but I couldn't see the syntax error.
hugo@brun:~/sources$ python whatsapp-web/chat.py
File "whatsapp-web/chat.py", line 249
sys.exit(print(e, decorateMsg("\n\tChromedriver Error. Read the above error (if any), then\n\tCheck ``if installed chromedriver version is compatible with installed Chrome version.", bcolors.WARNING)))