playsound icon indicating copy to clipboard operation
playsound copied to clipboard

Error 275. Cannot find the specified file. Make sure the path and filename are correct.

Open RahulShagri opened this issue 3 years ago • 9 comments

I am running wav and mp3 files on Windows 10 but get this error no matter where the file is kept, inside the folder or outside.

It also throws another error right after that - Error 263. The specified device is not open or is not recognized by MCI.

RahulShagri avatar Aug 06 '21 09:08 RahulShagri

as well, and would appreciate a solution : was working something like 1 or 2 years ago, and in the meantime I switched to the latest Python version, maybe this is the cause ?

jeremoquai avatar Aug 13 '21 07:08 jeremoquai

playsound('C:\keziah.mp3')

Error 259 for command:
    play "C:\keziah.mp3" wait
Le pilote ne peut pas reconnaître le paramètre de commande spécifié.

Error 305 for command:
    close "C:\keziah.mp3"
Impossible de spécifier des caractères supplémentaires après une chaîne entre guillemets.

Failed to close the file: "C:\keziah.mp3" Traceback (most recent call last): File "", line 1, in File "C:\Users\Jeremie\AppData\Local\Programs\Python\Python39\lib\site-packages\playsound.py", line 73, in _playsoundWin winCommand(u'play {}{}'.format(sound, ' wait' if block else '')) File "C:\Users\Jeremie\AppData\Local\Programs\Python\Python39\lib\site-packages\playsound.py", line 64, in winCommand raise PlaysoundException(exceptionMessage) playsound.PlaysoundException: Error 259 for command: play "C:\keziah.mp3" wait Le pilote ne peut pas reconnaître le paramètre de commande spécifié.

playsound('C:/keziah.mp3')

Error 259 for command:
    play C:/keziah.mp3 wait
Le pilote ne peut pas reconnaître le paramètre de commande spécifié.

Error 263 for command:
    close C:/keziah.mp3
Le périphérique spécifié n’est pas ouvert ou n’est pas reconnu par MCI.

Failed to close the file: C:/keziah.mp3 Traceback (most recent call last): File "", line 1, in File "C:\Users\Jeremie\AppData\Local\Programs\Python\Python39\lib\site-packages\playsound.py", line 73, in _playsoundWin winCommand(u'play {}{}'.format(sound, ' wait' if block else '')) File "C:\Users\Jeremie\AppData\Local\Programs\Python\Python39\lib\site-packages\playsound.py", line 64, in winCommand raise PlaysoundException(exceptionMessage) playsound.PlaysoundException: Error 259 for command: play C:/keziah.mp3 wait Le pilote ne peut pas reconnaître le paramètre de commande spécifié.

playsound('C:keziah.mp3')

Error 263 for command:
    open C:keziah.mp3
Le périphérique spécifié n’est pas ouvert ou n’est pas reconnu par MCI.

Error 263 for command:
    close C:keziah.mp3
Le périphérique spécifié n’est pas ouvert ou n’est pas reconnu par MCI.

Failed to close the file: C:keziah.mp3 Traceback (most recent call last): File "", line 1, in File "C:\Users\Jeremie\AppData\Local\Programs\Python\Python39\lib\site-packages\playsound.py", line 72, in _playsoundWin winCommand(u'open {}'.format(sound)) File "C:\Users\Jeremie\AppData\Local\Programs\Python\Python39\lib\site-packages\playsound.py", line 64, in winCommand raise PlaysoundException(exceptionMessage) playsound.PlaysoundException: Error 263 for command: open C:keziah.mp3 Le périphérique spécifié n’est pas ouvert ou n’est pas reconnu par MCI.

jeremoquai avatar Aug 13 '21 08:08 jeremoquai

@TaylorSMarks ?

jeremoquai avatar Aug 13 '21 09:08 jeremoquai

@jeremoquai - Sorry. There's newer code on master that hasn't been put on pypi yet. Could you try to install the latest version of playsound from github instead of pip and let me know if that works?

If the github version works, I'll try to update what's on pypi this weekend.

TaylorSMarks avatar Aug 13 '21 13:08 TaylorSMarks

hi @TaylorSMarks (poke @RahulShagri ) thanks for your kind answer unfortunately i'm a newbie on Python ;-) so I'll wait for the pypi version as I don't know how to install it directly

jeremoquai avatar Aug 13 '21 15:08 jeremoquai

(well i gave it a try and failed : i'm not good at it yet so) @TaylorSMarks please let us know when you update pypi thanks

jeremoquai avatar Aug 16 '21 13:08 jeremoquai

I am also having this error. Do I simply have to wait or is there something proactive I can be doing to resolve the issue?

GoldfishGallant avatar Sep 04 '21 07:09 GoldfishGallant

I have same issue on Windows 10. Manually close sound file like file.close() before playsound(file) may be can help.

HaoHoo avatar Feb 07 '22 04:02 HaoHoo