Jun-21-2022, 12:15 PM
(Jun-21-2022, 11:27 AM)snippsat Wrote: You most have footer.txt in same folder as main.py.
Or give path to where you have footer.txt.
with open(r"C:\somefolder\footer.txt") as f:
Below is the error i am receiving. I guess there should be string explained inside the bracket in f.read().
pywhatkit.sendwhatmsg_to_group("E9wnucCUpBpD1aizIUyLv6", f.read(), 15, 2)
Error:C:\Users\sisya\PycharmProjects\Whatsapppython\venv\Scripts\python.exe C:/Users/sisya/PycharmProjects/Whatsapppython/main.py
Traceback (most recent call last):
File "C:\Users\sisya\PycharmProjects\Whatsapppython\main.py", line 18, in <module>
pywhatkit.sendwhatmsg_to_group("E9wnucCUpBpD1aizIUyLv6", f.read(), 15, 2)
File "E:\Python310\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10: character maps to <undefined>