PyWhatKit
PyWhatKit copied to clipboard
ISSUE in sendwhats_image function
I am using python version 3.10.1 and the PYWHATKIT version is 5.3 and I am sending an image of 1237 KB using that function. Also, I saw Issue number #152 and change the whats.py and core.py. Also, I tried for a smaller PNG file of size 40KB accordingly but still, it is not sending the image to the WhatsApp group and the code is as follows:-
`
from pdf2image import convert_from_path import time import pywhatkit as pwk import flask import pyautogui images = convert_from_path('IOCC_REPORT_1B-1000[23-Jan-2022].pdf',500,poppler_path=r'C:\Users\IOCCIT\Release-22.01.0-0\poppler-22.01.0\Library\bin') for i in range(len(images)): images[i].save('2_HOURLY_OTP'+ str(i) +'.jpeg', 'JPEG') try: pwk.sendwhats_image("group_id", "C:\Users\IOCCIT\logo.png","1") pyautogui.click(1050, 950) print("Message Sent!") #Prints success message in console except: print("Error in sending the message")
`
The exact issue is that the program opens the WhatsApp web, but after some buffering, an error is popped out in the console. Kindly help me to resolve this issue.