Python 我想通过Pylast的Last.fm API获取用户信息

Python 我想通过Pylast的Last.fm API获取用户信息,python,api,last.fm,Python,Api,Last.fm,我想通过Pylast的Last.fm API获取用户信息,但它返回错误:bound方法,我想我需要您的帮助 import pylast API_KEY = "xxx" API_SECRET = "xxx" username = "xxx" password_hash = pylast.md5("xxx") network = pylast.LastFMNetwork(api_key = API_KEY, api_secret = API_SECRET, username = userna

我想通过Pylast的Last.fm API获取用户信息,但它返回错误:bound方法,我想我需要您的帮助

import pylast

API_KEY = "xxx"
API_SECRET = "xxx"

username = "xxx"
password_hash = pylast.md5("xxx")

network = pylast.LastFMNetwork(api_key = API_KEY, api_secret = API_SECRET, username =  username, password_hash = password_hash)

#Get User Info
user = pylast.User('xxx',network=network)
print user.get_id

这不是错误,它只是告诉您,
user.get\u id
是绑定到对象的函数


我想您需要的是
打印用户。get_id()
调用该函数,看看它能给您带来什么。。。确保您知道什么是函数:)

您需要更具体一些。为初学者添加完整的回溯信息。。。