我创建了一个虚拟助手之前播放的音乐,在我安装了一个 api “zolframalpha”之后,播放音乐时发生错误我附上了错误代码
错误是:
line 1 :-----File "C:\Users\Hari Prakash\Desktop\siri\main.py", line 62, in playMusic os.startfile(location+musics[0])
line2:--------- FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\Hari Prakash\\Desktop\\siri\\musics//wolframalpha.cpython-37.pyc'
def playMusic(self):
self.speak('Playing Music Please Wait')
musics = [x for x in os.walk(os.getcwd())][-1][-1]
shuffle(musics)
location = os.path.join(
os.getcwd(),
"musics//"
)
os.startfile(location+musics[0])
print(musics)
self.main()
波斯汪
相关分类