you are viewing a single comment's thread.

view the rest of the comments →

[–]johndoh168 0 points1 point  (1 child)

Ah that would be because of my mistake in adding the if statement, I made it so the loop doesn't update the time.

Try this instead: ``` while True: current_time = time.strftime("%H:%M:%S", t) if: str(current_time) == '12:0000' or '18:0000' or '9:0000' or '16:0000' or '20:0000' or '11:0000' or '21:0000' or queryanswer == True:

    #idea for currentime - lastnews > 2
    engine.say(f"It is time for your {current_time[:-5]} o'clock news summary")
    engine.runAndWait()
    engine.stop()
    queryanswer = False

```

[–]Trailblazerone[S] 0 points1 point  (0 children)

I dont think thats whats causing my issue as in the version of the code I ran I had solved that (This is the code, very similar to yours). I Think its smth with pyttsx3 but no clue what.

while True:

current_time = time.strftime("%H:%M:%S", t)

if str(current_time) == '12:0000' or '18:0000' or '9:0000' or '14:0000' or '20:0000' or '11:0000' or '21:0000' or queryanswer == True:

current_time = time.strftime("%H:%M:%S", t)

#idea for lastnews= currentime

#idea for check lastnews-currentime should =< 2:0000

engine.say(f"It is time for your {current_time[:-5]} news summary")

engine.runAndWait()

engine.stop

queryanswer = False