nate-parrott / Flashlight

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

Quick Search Broken #499

Open bholt opened 9 years ago

bholt commented 9 years ago

This is a really awesome system, thanks!

The Quick Web Search plugin is currently broken, looks like the appspot relay it relies on is down? Is there any way to implement this without the relay?

What I most want is to be able to select results without leaving spotlight. I couldn't tell if that's what this plugin does or not.

The error I get:

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

Thanks!

cHemingway commented 9 years ago

You are correct the relay is down, this is a dupe of #451, see there for details. To summarise, Bing's API is capped at a certain number of requests per month which Flashlight has exceeded.

Is there any way to implement this without the relay?

I'm unsure, but I suspect not, as the Bing API requires an API key, which should be kept private. Regardless, Flashlight would still be exceeding the free tier of Bing's API, unless each user creates their own account with Azure etc.

bholt commented 9 years ago

Sorry for the duplicate, searched for things that referenced "Quick Web Search". I was afraid it would be an API rate limit, I've had this problem with Google and thought maybe Bing would be different. Guess it'd be cool if there was a way to plug in your own API keys.