What steps will reproduce the problem? 1. Running the example code with an API key. 2. 3.
What is the expected output? What do you see instead? KeyError: 'Web'
What version of the product are you using? On what operating system? Pybing latest. win32 py2.7
Please provide any additional information below.
Comment #1
Posted on Feb 20, 2014 by Massive CatHere is the trackback of the same error:
Traceback (most recent call last): File "fetch.py", line 5, in for result in results: File "/usr/local/lib/python2.7/dist-packages/pybing-0.12-py2.7.egg/pybing/resultset.py", line 116, in iter for result in query.get_search_results(): File "/usr/local/lib/python2.7/dist-packages/pybing-0.12-py2.7.egg/pybing/query/query.py", line 76, in get_search_results response = self.get_search_response() File "/usr/local/lib/python2.7/dist-packages/pybing-0.12-py2.7.egg/pybing/query/query.py", line 72, in get_search_response return json.loads(contents)['SearchResponse'][self.SOURCE_TYPE] KeyError: 'Web'
Comment #2
Posted on Feb 20, 2014 by Massive CatThis seems to happen because the Bing API returns an error. The error that keeps poping up is:
{u'Errors': [{u'HelpUrl': u'http://msdn.microsoft.com/en-us/library/dd251042.aspx', u'Message': u'Parameter has invalid value.', u'Code': 1002, u'Parameter': u'SearchRequest.AppId', u'Value': u'//SNIP//'}], u'Query': {u'SearchTerms': u'python bing'}, u'Version': u'2.0'}
And yes, I have double checked that the API key is correct.
Comment #3
Posted on Feb 20, 2014 by Massive CatOh, I see not the reason here: https://code.google.com/p/pybing/issues/detail?id=11
Bing has changed it's authentication procedure
Comment #4
Posted on Oct 22, 2014 by Helpful BearI'm working/maintaining a (now working) repo that will comply with the newewst protocol:
Status: New
Labels:
Type-Defect
Priority-Medium