From 9ae01d5acc5843f5334ba62acc8bc814b5a19509 Mon Sep 17 00:00:00 2001 From: Antsiferov Bogdan <58101453+AntsiferovBogdan@users.noreply.github.com> Date: Fri, 23 Dec 2022 00:32:48 +0100 Subject: [PATCH] Fixed ValueError ValueError: time data '24:0:0' does not match format '%H:%M:%S' - this error should be except in "if time_hour not in range(25)" (x2) --- pywhatkit/whats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pywhatkit/whats.py b/pywhatkit/whats.py index f162c0a..ea9f6c3 100755 --- a/pywhatkit/whats.py +++ b/pywhatkit/whats.py @@ -96,7 +96,7 @@ def sendwhatmsg_to_group( ) -> None: """Send WhatsApp Message to a Group at a Certain Time""" - if time_hour not in range(25) or time_min not in range(60): + if time_hour not in range(24) or time_min not in range(60): raise Warning("Invalid Time Format!") current_time = time.localtime()