mmfeat icon indicating copy to clipboard operation
mmfeat copied to clipboard

Problem with OAuth and the FlickrMiner

Open elliottd opened this issue 8 years ago • 2 comments

I created an API key for an application in my Flickr account: appname

I configured the miner.yaml with the API key and Secret.

I created a directory to save the data output and created a query file with the following contents:

dog cat horse

I tried to run the Flickr miner using this command: python miner.py flickr query.txt output. The program asked me to obtain authentication from Flickr:

2

I authorized this action but I was redirected to the following page:

3

Nonetheless, I tried copying the URL into the application but it did not succeed:

4

Do you know what might be going wrong here?

elliottd avatar Oct 05 '16 10:10 elliottd

Hi,

Thank you for reporting this issue!

I ran the application with the same query file, but I couldn't reproduce the error so far. I get the 'Page Not Found' message too (which is not nice though) but the URL works after pasting it.

Could you please rerun the program after replacing the file mmfeat/mmfeat/miner/flickr.py with this one: https://gist.github.com/anitavero/8bd471cc75db84aa1aca5a7f22c7b073 and send me the printed error message in case the error occurs again?

Also it is probably worthwhile to retry the authentication after removing 'oauth.pkl', in case it has been saved.

Thanks a lot!

Anita

anitavero avatar Oct 06 '16 19:10 anitavero

@anitavero I replaced the flickr.py file and removed the oauth.pkl file. Now I get a new error:

delliott@elgin:~/src/mmfeat$ python miner.py flickr query.txt images
/home/delliott/src/mmfeat/mmfeat/miner/imagenet.py:20: UserWarning: Could not find NLTK WordNet.
  warnings.warn('Could not find NLTK WordNet.')
Flickr needs user authentication
--------------------------------
Visit this site:
http://flickr.com/services/oauth/authorize?oauth_token=XXX-YYY&perms=write
Paste the FULL URL here:https://www.flickr.com/services/oauth/paste_this?oauth_token=ZZZ-AAA&oauth_verifier=BBB
Querying for dog
ERR: Flickr API error  {u'stat': u'fail', u'code': 100, u'message': u'Invalid API Key (Key has invalid format)'}

elliottd avatar Oct 14 '16 11:10 elliottd