aws-s3-bucket-browser icon indicating copy to clipboard operation
aws-s3-bucket-browser copied to clipboard

Instant message to group gets error "'sleep_time' not defined"

Open NoamikoT opened this issue 3 years ago • 1 comments

Description

When trying to use the pywhatkit.sendwhatmsg_to_group_instantly() function, with correct params, I get an error saying:

Traceback (most recent call last):
  File "C:\Users\Noam\PycharmProjects\Whatsapp\Whatsappdo.py", line 4, in <module>
    pywhatkit.sendwhatmsg_to_group_instantly('XXXXXXXXXXXXXXXX', 'Test')
  File "C:\Users\Noam\PycharmProjects\Whatsapp\venv\lib\site-packages\pywhatkit\whats.py", line 128, in sendwhatmsg_to_group_instantly
    time.sleep(sleep_time)
NameError: name 'sleep_time' is not defined

https://stackoverflow.com/questions/72545794/pywhatkit-instant-message-to-group-gets-error-sleep-time-not-defined#comment128150880_72545794

To Reproduce

Copy the following code:

import pywhatkit

# syntax: phone number with country code, message
pywhatkit.sendwhatmsg_to_group_instantly('XXXXXXXXXXXXXXXX', 'Test')

Change the group code (XXXXXXXXXXXXXXXX) to a valid one then run it.

Version Information

  • OS: Windows 11
  • Browser: Opera GX
  • Python: 3.9
  • PyWhatKit: 5.3

NoamikoT avatar Jun 08 '22 13:06 NoamikoT