'Trying to play an MP3 through python with playsound. Not working Correctly
im just simply trying to play a sound with the "playsound" module but its not working, im certin i put the path in correctly. heres my code and the error.
from playsound import *
playsound("C:\\Users\\dally\\Music\\alarm.mp3")
error is : Error 305 for command: open "C:\Users\dally\Music\alarm.mp3" Cannot specify extra characters after a string enclosed in quotation marks.
Error 263 for command:
close "C:\Users\dally\Music\alarm.mp3"
The specified device is not open or is not recognized by MCI.
Failed to close the file: "C:\Users\dally\Music\alarm.mp3" Traceback (most recent call last): File "c:\Users\dally\Desktop\Pyhton Projects\alarmclock.py", line 4, in playsound("C:\Users\dally\Music\alarm.mp3") File "C:\Users\dally\AppData\Local\Programs\Python\Python310\lib\site-packages\playsound.py", line 72, in _playsoundWin winCommand(u'open {}'.format(sound)) File "C:\Users\dally\AppData\Local\Programs\Python\Python310\lib\site-packages\playsound.py", line 64, in winCommand raise PlaysoundException(exceptionMessage) playsound.PlaysoundException: Error 305 for command: open "C:\Users\dally\Music\alarm.mp3" Cannot specify extra characters after a string enclosed in quotation marks.
thank you for reading
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
