Spotipyを使用すると 'current_user_recently_played'はAttributeError: 'Spotifyは' オブジェクト)(無属性 'current_user_saved_tracks'
token = util.prompt_for_user_token(username, scope = scope, client_id=client_id, client_secret=client_secret, redirect_uri=redirect_uri)
sp = spotipy.Spotify(auth = token)
saved = sp.current_user_saved_tracks()
print(saved)
recent = sp.current_user_recently_played()
print(recent)
sp.current_user_saved_tracksしようとしていますがありません(sp.current_user_recently_played、うまく動作しますが)明らかに存在しません。それは明らかに文書https://spotipy.readthedocs.io/en/latest/#more-examplesに記載されています。
実行 - v2.4.4 -
おかげで事前に2017年1月4日
。Traceback (most recent call last):
File "C:\Users\Martin\Google Drive\Python\Spotify\try_req.py", line 19, in <module>
recent = sp.current_user_recently_played()
AttributeError: 'Spotify' object has no attribute 'current_user_recently_played'
https://spotipy.readthedocs.io/en/latest/#spotipy.client.Spotify.current_user_recently_played –
最新バージョンに更新しましたか? –
私がv2.4.4 - 2017年1月4日まで伝えることができる限り、最新のバージョンです。 @cᴏʟᴅsᴘᴇᴇᴅ –