Hey so im a new programmer and i wanted to know why when i choose the second option in the music_list, it doesnt play the second song, instead it plays nothing. It works for valley but not for Night sky or crossing cat
if (self.time_left <= 0) and (self.mus_combobox.get()=='Valley'):
process = multiprocessing.Process(target=playsound,
args=('Valley.mp3',))
process.start()
messagebox.showinfo("Time's Up!","TIME'S UP!")
process.terminate()
# Clearing the 'self.button_frame' frame
self.Clear_Screen()
if (self.time_left <= 0) and (self.mus_combobox.get()== "Night Sky"):
process = multiprocessing.Process(target=playsound,
args=('Night.mp3'))
process.start()
process.terminate()
messagebox.showinfo("Time's Up!","TIME'S UP!")
self.Clear_Screen()
if (self.time_left <= 0) and (self.mus_combobox.get()== "Crossing cat"):
process = multiprocessing.Process(target=playsound,
args=('Nightsky.mp3'))
process.start()
process.terminate()
messagebox.showinfo("Time's Up!","TIME'S UP!")
self.Clear_Screen()
self.mus_combobox is the list that contains all the music names
def musicplay(self):
self.mus=IntVar()
self.mus_combobox= ttk.Combobox(self.window, width=9,
height=10, textvariable=self.mus,
font=("times new roman",8))
self.mus_combobox['state']='readonly'
self.mus_combobox['values']= music_list
self.mus_combobox.current(0)
self.mus_combobox.place(x=320, y=370)