0

我用这条线玩我的游戏

playsound(os.path.join(os.path.dirname(__file__) , 'asset', C1 + '.mp3'))

它在linux上运行良好,但在windows上我得到输出:

raise PlaysoundException(exceptionMessage)
playsound.PlaysoundException: 
    Error 275 for command:
        open "E:\test\asset\sound3.mp3" alias playsound_0.4871568054138944
    Cannot find the specified file.  Make sure the path and filename are correct

当我输入完整路径时

Error 277 for command:
        open "E:\JPssetound3.mp3" alias playsound_0.511238440569949
    A problem occurred in initializing MCI.
4

1 回答 1

0

检查文件是否存在于命令提示符或文件资源管理器中。该文件应该存在于您期望的文件夹中。

于 2020-08-22T04:05:02.777 回答