我也检查了路径变量,其他功能一切正常,但仅显示此模块的错误。代码:
from playsound import playsound
playsound('E://PYTHON//Music.mp3')
以下是错误:
PS C:\Users\HP> & C:/Users/HP/AppData/Local/Programs/Python/Python39/python.exe e:/PYTHON/Playsound.py
Error 263 for command:
open E://PYTHON//Music.mp3
The specified device is not open or is not recognized by MCI.
Error 263 for command:
close E://PYTHON//Music.mp3
Failed to close the file: E://PYTHON//Music.mp3
Traceback (most recent call last):
File "e:\PYTHON\Playsound.py", line 2, in <module>
playsound('E://PYTHON//Music.mp3')
File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\playsound.py", line 72, in _playsoundWin
winCommand(u'open {}'.format(sound))
File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\playsound.py", line 64, in winCommand
raise PlaysoundException(exceptionMessage)
playsound.PlaysoundException:
Error 263 for command:
open E://PYTHON//Music.mp3
The specified device is not open or is not recognized by MCI.
PS C:\Users\HP> & C:/Users/HP/AppData/Local/Programs/Python/Python39/python.exe e:/PYTHON/Playsound.py
Error 263 for command:
open E://PYTHON//Music.mp3
The specified device is not open or is not recognized by MCI.
Error 263 for command:
close E://PYTHON//Music.mp3
The specified device is not open or is not recognized by MCI.
Failed to close the file: E://PYTHON//Music.mp3
Traceback (most recent call last):
File "e:\PYTHON\Playsound.py", line 2, in <module>
playsound('E://PYTHON//Music.mp3')
File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\playsound.py", line 72, in _playsoundWin
winCommand(u'open {}'.format(sound))
File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\playsound.py", line 64, in winCommand
raise PlaysoundException(exceptionMessage)
playsound.PlaysoundException:
Error 263 for command:
open E://PYTHON//Music.mp3
The specified device is not open or is not recognized by MCI.