Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with OAuth and the FlickrMiner #7

Open
elliottd opened this issue Oct 5, 2016 · 2 comments
Open

Problem with OAuth and the FlickrMiner #7

elliottd opened this issue Oct 5, 2016 · 2 comments

Comments

@elliottd
Copy link
Contributor

elliottd commented Oct 5, 2016

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?

@anitavero
Copy link
Collaborator

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

@elliottd
Copy link
Contributor Author

elliottd commented Oct 14, 2016

@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)'}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants