ubergrape / pyspotlight

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

Server down? #18

Closed mdtux89 closed 4 years ago

mdtux89 commented 4 years ago

I try the following test:

annotations = spotlight.annotate('http://localhost/rest/annotate', 'Your test text', confidence=0.4, support=20)

And I get the error:

Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection raise err File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 61] Connection refused .... urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x10b484110>: Failed to establish a new connection: [Errno 61] Connection refused

originell commented 4 years ago

hey @mdtux89 !

Are you running spotlight under port 80? that's where it tries to connect if you don't specify a port (e.g. localhost:8000)

mdtux89 commented 4 years ago

I'm silly. I copied without realising that was a localhost url :)

originell commented 4 years ago

Ah! Yeah that is a bit confusing in the README :-) Glad that got cleared up this quickly