import tkinter as tk
from playsound import playsound
root = tk.Tk()
root.geometry("300x300")
tk.Button(text="Cristiano Ronaldo", command = lambda : playsound("siuuu.mp3")).pack()
root.mainloop()
Yukarıdaki gibi biir kod yazdım lakin butona ikinci defa basınca aşağıdaki gibi bir hata veriyor:
Error 263 for command:
close siuuu.mp3
Bu, kaydedilmiş bir MCI aygıtı değil.
Failed to close the file: siuuu.mp3
Error 265 for command:
open siuuu.mp3
Aygıt adı bu uygulama tarafından zaten bir diğer ad olarak kullanılıyor. Benzersiz bir diğer ad kullanın.
Error 263 for command:
close siuuu.mp3
Bu, kaydedilmiş bir MCI aygıtı değil.
Failed to close the file: siuuu.mp3
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\toshiba\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 1892, in __call__
return self.func(*args)
File "C:\Users\toshiba\AppData\Local\Programs\Python\Python39\swes.py", line 7, in <lambda>
tk.Button(text="Cristiano Ronaldo", command = lambda : playsound("siuuu.mp3")).pack()
File "C:\Users\toshiba\AppData\Local\Programs\Python\Python39\lib\site-packages\playsound.py", line 72, in _playsoundWin
winCommand(u'open {}'.format(sound))
File "C:\Users\toshiba\AppData\Local\Programs\Python\Python39\lib\site-packages\playsound.py", line 64, in winCommand
raise PlaysoundException(exceptionMessage)
playsound.PlaysoundException:
Error 265 for command:
open siuuu.mp3
Aygıt adı bu uygulama tarafından zaten bir diğer ad olarak kullanılıyor. Benzersiz bir diğer ad kullanın.
Error 265 for command:
open siuuu.mp3
Aygıt adı bu uygulama tarafından zaten bir diğer ad olarak kullanılıyor. Benzersiz bir diğer ad kullanın.
Error 263 for command:
close siuuu.mp3
Bu, kaydedilmiş bir MCI aygıtı değil.
Failed to close the file: siuuu.mp3
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\toshiba\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 1892, in __call__
return self.func(*args)
File "C:\Users\toshiba\AppData\Local\Programs\Python\Python39\swes.py", line 7, in <lambda>
tk.Button(text="Cristiano Ronaldo", command = lambda : playsound("siuuu.mp3")).pack()
File "C:\Users\toshiba\AppData\Local\Programs\Python\Python39\lib\site-packages\playsound.py", line 72, in _playsoundWin
winCommand(u'open {}'.format(sound))
File "C:\Users\toshiba\AppData\Local\Programs\Python\Python39\lib\site-packages\playsound.py", line 64, in winCommand
raise PlaysoundException(exceptionMessage)
playsound.PlaysoundException:
Error 265 for command:
open siuuu.mp3
Aygıt adı bu uygulama tarafından zaten bir diğer ad olarak kullanılıyor. Benzersiz bir diğer ad kullanın.
Nasıl düzeltebilirim?