코드 실행중 다음과 같은 에러가 발생합니다.
root@4a30c3e1a0c7:/new_drama_graph/knowledge_graph# ./run_knowledge_graph.sh
2020-11-03 18:37:37,602 __main__ INFO Config: {'mode': 'subtitle', 'output_dir': 'data/output', 'preprocessing': {'load': False, 'substitle_file': 'data/input/AnotherMissOh_Scene_Subtitle', 'output_path': 'data/output/preprocessed.json', 'coreference': 'gold'}, 'extraction': {'load': False, 'oie': 'stanford', 'frame': 'frameBERT', 'output_path': 'data/output/extracted.json'}, 'background': {'load': False, 'input_path': 'data/background.txt', 'output_path': 'data/output/background_KB.json'}, 'graph': {'character_name': 'data/character.txt', 'use_backKB': True, 'visualization': 'all', 'package_path': '/usr/share/graphviz', 'graph_path': 'data/output/graphs', 'json_path': 'data/output/graph.json', 'character': 'all', 'only_use': 'None'}}
preprocessing..
Can't match Parentheses: Hey! What are you(Heeran) going to do if I drink this in one shot?)
Can't match Parentheses: You(Heayoung1)'re so gross!)
done..
extracting knowledge..
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 83, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.6/http/client.py", line 1264, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1310, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1259, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1038, in _send_output
self.send(msg)
File "/usr/lib/python3.6/http/client.py", line 976, in send
self.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fde63ab7630>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='143.248.135.188', port=1106): Max retries exceeded with url: /frameBERT (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fde63ab7630>: Failed to establish a new connection: [Errno 111] Connection refused',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 38, in <module>
extractor = extractor(config, preprocessor.output)
File "/new_drama_graph/knowledge_graph/knowledge_extraction/extractor.py", line 15, in __init__
self.frame = frame(config, self.input)
File "/new_drama_graph/knowledge_graph/knowledge_extraction/frame.py", line 15, in __init__
self.output = self.run()
File "/new_drama_graph/knowledge_graph/knowledge_extraction/frame.py", line 27, in run
results = eng_frameBERT(sent['statement'])
File "/new_drama_graph/knowledge_graph/knowledge_extraction/frame.py", line 8, in eng_frameBERT
response = requests.post(host, data=data, verify=False)
File "/usr/local/lib/python3.6/dist-packages/requests/api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='143.248.135.188', port=1106): Max retries exceeded with url: /frameBERT (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fde63ab7630>: Failed to establish a new connection: [Errno 111] Connection refused',))