gabrielStanovsky/unified-factuality

annotate_factuality.sh: Connection refused error

judithek opened this issue · 4 comments

echo "John refused to go" | ./scripts/annotate_factuality.sh
INFO:root:Reading sentences from STDIN (hit Ctrl-D to finish)
INFO:root:Parsing: John refused to go
Traceback (most recent call last):
File "./annotate_factuality.py", line 65, in
post_to_props(sent).text.split(','))
File "/home/local/UKP/eckle/unified-factuality/src/parsers/props_server.py", line 31, in post_to_props
params = {'text': sent})
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 70, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 56, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 487, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8081): Max retries exceeded with url: /tparse?text=John+refused+to+go (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fd037195d10>: Failed to establish a new connection: [Errno 111] Connection refused',))

this issue still exists (also on Ubuntu 16.04.1)

This happens in case the servers are not up properly.
Did starting the the two servers ran without any problems?

no, the Props server is not up,
I get a Java related error:

INFO:root:Starting Berkeley parser from /usr/local/lib/python2.7/dist-packages/props-1.0-py2.7.egg/props/application../berkeleyparser/BerkeleyParser-1.7.jar
Traceback (most recent call last):
  File "./parsers/props_server.py", line 97, in <module>
    load_berkeley()
  File "/usr/local/lib/python2.7/dist-packages/props-1.0-py2.7.egg/props/applications/run.py", line 24, in load_berkey
    startup(cp)
  File "build/bdist.linux-x86_64/egg/BerkeleyInterface/berkeleyinterface.py", line 129, in startup
  File "/usr/local/lib/python2.7/dist-packages/jpype/_core.py", line 96, in getDefaultJVMPath
    return _linux.getDefaultJVMPath()
  File "/usr/local/lib/python2.7/dist-packages/jpype/_linux.py", line 36, in getDefaultJVMPath
    jvm = _getJVMFromJavaHome()
  File "/usr/local/lib/python2.7/dist-packages/jpype/_linux.py", line 55, in _getJVMFromJavaHome
    if os.path.exists(java_home+"/bin/javac") :
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

resolved