I Saw this question here. But my file is already in wav. My code is a timer which plays sound after timer ends using threading. It wasn't working there, then I tried it in different file which just had the file and library:
from playsound import playsound
playsound('alarm.wav')
When I do this following error occurs:
Error 259 for command:
play alarm.wav wait
The driver cannot recognize the specified command parameter.
Traceback (most recent call last)
...
playsound.PlaysoundException:
Error 259 for command:
play alarm.wav wait
The driver cannot recognize the specified command parameter.
But when I give the path:
from playsound import playsound
playsound('path/to/alarm.wav')
the following error occurs in a pop box (SyntaxError):
(unicode error)some stuff after that
I'm on Windows and I tried it on IDLE and by double clicking the file (Python3.7.3).
If it helps, it works on a different device (both have same Python versions).