user1930071
user1930071

Reputation: 1

I want to get the user info through Last.fm API by Pylast

I want to get the user info through Last.fm API by Pylast,but it returns error: bound method,I think I need your help.

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

Upvotes: 0

Views: 568

Answers (1)

jadkik94
jadkik94

Reputation: 7078

This is not an error, it's just telling you that user.get_id is a function bound to an object.

I think what you need is print user.get_id() to call that function and see what it gives you... Make sure you know what functions are :)

Upvotes: 1

Related Questions