ubergrape / pyspotlight

A thin wrapper around the DBPedia Spotlight REST API
BSD 2-Clause "Simplified" License
58 stars 25 forks source link

lib seems to be broken #15

Open phdowling opened 8 years ago

phdowling commented 8 years ago

I'm trying out this simple example:

>>> import spotlight
>>> SPOTLIGHT_URL = "http://spotlight.sztaki.hu:2222/rest/annotate"
>>> annotations = spotlight.annotate(SPOTLIGHT_URL, "President Obama", confidence=0.4, support=20)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/spotlight/__init__.py", line 161, in annotate
    response.raise_for_status()
  File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 840, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://spotlight.sztaki.hu:2222/rest/annotate

The same happens for my own installation of spotlight. Are we sending out an incompatible request?

originell commented 8 years ago

Maintenance of this repository has stopped. You can find a new, maintained, version at https://github.com/aolieman/pyspotlight

that might also fix your bug ;)