import sys
import spotipy
import spotipy.util as util
username = "un"
scope = 'user-library-read'
token = util.prompt_for_user_token(username,scope)
if token:
sp = spotipy.Spotify(auth=token)
devices=spotipy.client.Spotify.devices()
print(devices)
else:
print("Can't get token for", username)
这个小脚本应该可以打印出设备,但出现错误AttributeError: type object 'Spotify' has no attribute 'devices'
我检查了Spotipy的版本。现在是2.4.4。安装已完成,但是此documentation中的客户端对象的大多数播放功能都丢失了,并给出了相同的错误消息。他们为什么缺席?