TaylorSMarks / playsound

Pure Python, cross platform, single function module with no dependencies for playing sounds.
Other
517 stars 114 forks source link

Error 259 on Windows 10 #105

Closed sahver closed 2 years ago

sahver commented 2 years ago

playsound('./sounds/iphone_ding.mp3', block=True)

plays the sound, but also returns this error:

    Error 259 for command:
        play ./sounds/iphone_ding.mp3 wait
    The driver cannot recognize the specified command parameter.

python 3.8.12, playsound 1.3.0 on Windows 10 Pro 19043.1288

AustinAres2007 commented 2 years ago

Put the full path of the audio file, it may look more complicated, but I re-created your problem, and it's because it's not using the full path of the file

Example: "Z:\Documents\Code\Experimentation\program-directory\sounds\iphone_ding.mp3"

Also block is True by default, no need to specify it.

sahver commented 2 years ago

Thanks, the issue is solved now.

I ended up using

playsound( os.path.abspath('./sounds/iphone_ding.mp3') )

to go around the need to use full path as I am executing the code both from Windows and Linux.

TaylorSMarks commented 2 years ago

Interesting. I would like Windows and Linux to behave the same way, so if just changing the path is all it takes, the Windows version should handle that for you.

Taylor

On Nov 14, 2021, at 02:48, sahver @.***> wrote:

 Closed #105.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.