我正在尝试使用Spotipy for Python从Spotify获得歌曲的音频功能。
这是我的代码:
import spotipy as sp
myFeatures = sp.Spotify
myID = ["2iE18Oxc8YSumAU232n4rW"]
sp.Spotify.audio_features(myFeatures, myID)
我得到这个错误:
回溯(最近通话最近):文件 “ C:/Users/OWNER/Dropbox/1phd/database/pythonFiles/spotipy/get.audio.features.py”, 第7行 sp.Spotify.audio_features(myFeatures,myID)文件“ C:\ Users \ OWNER \ AppData \ Local \ Programs \ Python \ Python36-32 \ lib \ site-packages \ spotipy \ client.py”, 828行,在audio_features中 tlist = [self._get_id('track',t)for track in t]文件“ C:\ Users \ OWNER \ AppData \ Local \ Programs \ Python \ Python36-32 \ lib \ site-packages \ spotipy \ client.py ”, 828行,在 tlist = [self._get_id('track',t)for轨道中的t] TypeError:_get_id()缺少1个必需的位置参数:'id'
我在做什么错了?
谢谢:)