Ankit404butfound / PyWhatKit

Send WhatsApp message at certain time and many other things.
MIT License
1.34k stars 294 forks source link

[Errno 13] Permission denied: 'PyWhatKit_DB.txt' #225

Open HenryTH45 opened 2 years ago

HenryTH45 commented 2 years ago

Hi, i am using Pywhatkit but am running into this error.

Traceback (most recent call last):
  File "C:\Users\Henry\Desktop\Test.py", line 32, in <module>
    pwk.sendwhatmsg_instantly(row[5],row[6], 10, tab_close=True)
  File "C:\Users\Henry\AppData\Local\Programs\Python\Python310\lib\site-packages\pywhatkit\whats.py", line 33, in sendwhatmsg_instantly
    log.log_message(_time=time.localtime(), receiver=phone_no, message=message)
  File "C:\Users\Henry\AppData\Local\Programs\Python\Python310\lib\site-packages\pywhatkit\core\log.py", line 26, in log_message
    file = open("PyWhatKit_DB.txt", "w+")
PermissionError: [Errno 13] Permission denied: 'PyWhatKit_DB.txt'

Anyone know the issue? My Code- pwk.sendwhatmsg_instantly("+44******","TEST MSG", 10, tab_close=True)

Peartre commented 2 years ago

@HenryTH45 have you checked that the user running this code has read/write permissions on the folder containing the PyWhatKit_DB.txt file?