nate-parrott / Flashlight

The missing Spotlight plugin system
http://flashlight.nateparrott.com
Other
5.39k stars 411 forks source link

"/" web (Bing) search preview not working #451

Open cbrunnkvist opened 9 years ago

cbrunnkvist commented 9 years ago

Previews using the default search (on a fresh install) display a Python traceback instead of results:

skarmavbild_2015-04-29_kl__10_03_42

cor commented 9 years ago

I too have this issue, this is the error i'm getting:

Internal Server Error

The server has either erred or is incapable of performing the requested operation.

Traceback (most recent call last):
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__
    rv = self.handle_exception(request, response, e)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__
    rv = self.router.dispatch(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__
    return handler.dispatch()
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
  File "/base/data/home/apps/s~flashlightsearchrelay/1.383741973010990396/main.py", line 30, in get
    response = query(self.request.get('q'), sources=source)
  File "/base/data/home/apps/s~flashlightsearchrelay/1.383741973010990396/query.py", line 9, in query
    return response.json()
  File "/base/data/home/apps/s~flashlightsearchrelay/1.383741973010990396/requests/models.py", line 732, in json
    return json.loads(self.content.decode(encoding), **kwargs)
  File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
cHemingway commented 9 years ago

It appears the issue lies in the web service flashlightsearchrelay which runs at https://flashlightsearchrelay.appspot.com. The error message is generated by that service, and seems to be because Bing's API has stopped returning data to the service. You can see this error by manually accessing the service yourself, such as this search for fish: https://flashlightsearchrelay.appspot.com/search/web?q=fish

This might be as Flashlight has exceeded the Bing API free tier of 5000 transactions/month.

cor commented 9 years ago

So we basically can't use this plugin unless someone pays Microsoft for more Bing searches?

nate-parrott commented 9 years ago

@CorPruijs yep, that's the case.

I've reached out to MS BizSpark to see if we can get some sort of credits (they give $150 worth of free Azure credits to startups, maybe they'd be willing to cut a deal for an open-source project) — I'll post an update when I learn more.

rapcal commented 9 years ago

Thanks @nate-parrott for not only putting this amazing tool together but also managing the business complexities around it! :+1:

twayz commented 9 years ago

same issue here. thanks.