且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在python中导入VLC模块时出现属性错误

更新时间:2022-05-24 22:11:41

您正在第5行的MediaPlayer构造函数中传递一个列表,但它需要一个字符串(参考:

You're passing a list in MediaPlayer constructor in line#5, but it expects a string(ref: https://linuxconfig.org/how-to-play-audio-with-vlc-in-python).

尝试进行此更改:

m = vlc.MediaPlayer('D:\faith-42201.mp3')