Domanda

Sample code, where photo_id is an id string and flickr a successfully authenticated Flickr API session:

rsp = flickr.photos_getInfo(photo_id)

Error:

TypeError: handler() takes exactly 0 arguments (1 given)

http://www.flickr.com/services/api/flickr.photos.getInfo.html says that photos_getInfo takes (at least) one argument, so what is wrong here?

È stato utile?

Soluzione

The call to photos_getInfo needs to use a keyword argument, like this:

rsp = flickr.photos_getInfo(photo_id = photo_id)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top