Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/opengl/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x Spotipy当前用户保存的曲目不返回任何内容_Python 3.x_Spotify_Spotipy - Fatal编程技术网

Python 3.x Spotipy当前用户保存的曲目不返回任何内容

Python 3.x Spotipy当前用户保存的曲目不返回任何内容,python-3.x,spotify,spotipy,Python 3.x,Spotify,Spotipy,我正在尝试使用Spotipy获取spotify数据,但运行时: token = util.prompt_for_user_token(username, scope="user-library-read user-top-read", client_id=client_id, client_secret=client_secret, redirect_uri='http://localhost/') sp = spotipy.Spotify(auth=token) 然后 tracks = sp

我正在尝试使用Spotipy获取spotify数据,但运行时:

token = util.prompt_for_user_token(username, scope="user-library-read user-top-read", client_id=client_id, client_secret=client_secret, redirect_uri='http://localhost/')
sp = spotipy.Spotify(auth=token)
然后

tracks = sp.current_user_saved_tracks()
它返回空的json数据。
只有当我这样做的时候它才会起作用
top.当前\u用户\u顶级\u艺术家(限制=10,时间范围为长期)
但对于时间范围,不能使用不同的参数值