i am getting this error when i use flickr api

45 views Asked by At
import flickrapi
api_key = '<api key>'
api_password = '<api secret>'
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']

the error is Traceback (most recent call last): File "F:\web\joke.py", line 5, in favourites = flickrClient.favorites_getPublicList(user_id='132339441@N02') NameError: name 'flickrClient' is not defined

1

There are 1 answers

0
Avión On

You are defining flickrclient with c and flickrClient with capital C.

So change flickrclient to flickrClient:

flickrClient = flickrapi.FlickrAPI(api_key, api_password)