This is my code:
from playsound import playsound
playsound(r'C:\Users\owner\Downloads\BotW Item.mp3')
And this is the error I get:
This is my code:
from playsound import playsound
playsound(r'C:\Users\owner\Downloads\BotW Item.mp3')
And this is the error I get:
Try it like this: r'C:\\Users\\owner\\Downloads\\BotW Item.mp3'
or just add one of them i.e like this: r'C:\\Users\owner\Downloads\BotW Item.mp3'
. You have to escape the \
character and the escape sequence for it in python is :\\
.
If this doesn't work you can use os module:
import os
os.startfile('C:\\Users\\owner\\Downloads\\BotW Item.mp3')
Also regarding the playsound module, you should import it like this:
from playsound import playsound
playsound('C:\\Users\\owner\\Downloads\\BotW Item.mp3')