蟒。播放音效"TypeError: sequence item 3: expected str instance, bytes found"



我正在研究一个小脚本,它必须播放我的一个声音。大约1.5秒。

import playsound
mp3_sound = "audio.mp3"
playsound.playsound(mp3_sound)

它给出了这个错误:

"TypeError: sequence item 3: expected str instance, bytes found"

请帮忙。

我假设您的文件不在运行时文件夹中。我将运行以下代码来验证您是否提供了正确的文件路径。

# one of many ways 
import os.path
os.path.exists(path_to_file)

相关内容

最新更新