i am geting this error when i use flickr api

259 views Asked by At
import flickrapi
api_key = '1d3544994fb9b9a3a873a4e1c34fbe08'
api_password = '4b466122f9186bef'
flickrclient = flickrapi.FlickrAPI(api_key, api_password)
favourites = flickrclient.favorites_getPublicList(user_id='132339441@N02')
photos = flickr.photos_search(user_id='132339441@N02', per_page='10')
sets = flickr.photosets_getList(user_id='132339441@N02')
for photo in favourites.photos[0].photo:
    print photo['title']

error is:

Traceback (most recent call last): File "F:\web\joke.py", line 6, in photos = flickr.photos_search(user_id='132339441@N02', per_page='10') NameError: name 'flickr' is not defined

1

There are 1 answers

0
wezzy On

Hi there is a typo because you are working with a variable called

flickrclient

And then you start using

flickr

I suspect some copy and paste ;-)