I have this very simple test code:
from playsound import playsound
playsound('alarmsound.wav')
alarmsound.wav is a file in the same directory. when I run it in a terminal, it works fine. But when I run it in VSCode, it blows up with the following message:
Traceback (most recent call last):
File "c:/Users/Luca/Desktop/Python/own/playaudio.py", line 3, in <module>
playsound('alarmsound.wav')
File "C:\Users\Luca\AppData\Local\Programs\Python\Python38-32\lib\site-packages\playsound.py", line 35, in _playsoundWin
winCommand('open "' + sound + '" alias', alias)
File "C:\Users\Luca\AppData\Local\Programs\Python\Python38-32\lib\site-packages\playsound.py", line 31, in winCommand
raise PlaysoundException(exceptionMessage)
playsound.PlaysoundException:
Error 275 for command:
open "alarmsound.wav" alias playsound_0.7197283376226026
Cannot find the specified file. Make sure the path and filename are correct.
It used to work in vscode before, now suddenly it blows up. what could be wrong?