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

raise FlickrError #4

Open
infrontofme opened this issue Jun 5, 2020 · 2 comments
Open

raise FlickrError #4

infrontofme opened this issue Jun 5, 2020 · 2 comments

Comments

@infrontofme
Copy link

infrontofme commented Jun 5, 2020

Hi, when I run following script:

python flickr_scraper.py --search 'honeybees on flowers' --n 10 --download

an error occurred.

Traceback (most recent call last):
  File "flickr_scraper.py", line 68, in <module>
    download=opt.download)  # download images
  File "flickr_scraper.py", line 33, in get_urls
    for i, photo in enumerate(photos):
  File "C:\Users\nanwa\anaconda3\lib\site-packages\flickrapi\core.py", line 688, in data_walker
    rsp = method(page=page, **params)
  File "C:\Users\nanwa\anaconda3\lib\site-packages\flickrapi\call_builder.py", line 38, in __call__
    return self.flickrapi_object.do_flickr_call(self.method_name, **kwargs)
  File "C:\Users\nanwa\anaconda3\lib\site-packages\flickrapi\core.py", line 337, in do_flickr_call
    **params)
  File "C:\Users\nanwa\anaconda3\lib\site-packages\flickrapi\core.py", line 407, in _wrap_in_parser
    return parser(self, data)
  File "C:\Users\nanwa\anaconda3\lib\site-packages\flickrapi\core.py", line 297, in parse_etree
    raise FlickrError(six.u('Error: %(code)s: %(msg)s') % err.attrib, code=code)
flickrapi.exceptions.FlickrError: Error: 100: Invalid API Key (Key has invalid format)

I tried both on windows and ubuntu, reports the same error

:)

@berkantay
Copy link

did you embed your api and secret key to the flicker_scraper.py

@glenn-jocher
Copy link
Member

glenn-jocher commented Dec 10, 2020

@infrontofme @berkantay you need to use your own API key, as the README explains:

Use

  1. Request a Flickr API key: https://www.flickr.com/services/apps/create/apply

  2. Write your API key and secret in flickr_scraper.py L11-L12:

key = ''
secret = ''

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

3 participants