rrwen / search_google

A command line tool and module for Google web and image search
https://rrwen.github.io/search_google
MIT License
12 stars 1 forks source link

KeyError 'items' #1

Closed Ehco1996 closed 7 years ago

Ehco1996 commented 7 years ago

Hi buddy , you project is amazing !!! but when i try to deploy on my own system, some bad thing happened please help me to find out what step is wrong

i have already set the google search cx and api key

this is log:

Traceback (most recent call last):
  File "/usr/local/var/pyenv/versions/venv-3.6.1/bin/search_google", line 11, in <module>
    load_entry_point('search-google==1.2.0', 'console_scripts', 'search_google')()
  File "/usr/local/var/pyenv/versions/3.6.1/envs/venv-3.6.1/lib/python3.6/site-packages/search_google/cli.py", line 155, in run
    results.preview(n=int(optionargs['preview']))
  File "/usr/local/var/pyenv/versions/3.6.1/envs/venv-3.6.1/lib/python3.6/site-packages/search_google/api.py", line 153, in preview
    items = self.metadata[k]
KeyError: 'items'
rrwen commented 7 years ago

Hi @Ehco1996

Thank you for the issue submission.

Could you provide me with the command line call or python call that raised this error?

Please do not include your google search cx and api key credentials.

Ehco1996 commented 7 years ago

@rrwen

after i reset the cx id and api key , those problem gone thank you again !!!

jennymansour96 commented 6 years ago

Hello @Ehco1996. I have exactly the same problem, how did you reset cx id and api key? I tried to define them again, but it is still not working... Thank you very much!!

rrwen commented 6 years ago

@jennymansour96

You can reset the cx id and api key by deleting the old ones and generating new ones in the managment console.

Please note that the Google CSE API has rate limits.

Erroneous-User commented 6 years ago

I'm too facing same problem. but how exactly I reset cx id and api key. i don't have any idea about them

rrwen commented 6 years ago

@Adarshnerd

Please follow the documentation to create a cx id and an api key:

https://rrwen.github.io/search_google/#setup

To reset them, delete and recreate