dmis-lab / BERN2

BERN2: an advanced neural biomedical namedentity recognition and normalization tool
http://bern2.korea.ac.kr
BSD 2-Clause "Simplified" License
175 stars 42 forks source link

Connection refused error #59

Closed anopperl closed 8 months ago

anopperl commented 8 months ago

I am trying to run bern2 but getting some errors. I am very new to this tool. could you please me ? these are error

` bern2 | [20/Mar/2024 13:25:33.147503] id: 75b4bb1d2380f2dd1937d48b18147d9d17323003802f948bd7668774 bern2 | [Errno 111] Connection refused bern2 | [20/Mar/2024 13:25:33.150061] [75b4bb1d2380f2dd1937d48b18147d9d17323003802f948bd7668774] tmVar 2.0 0.00039196014404296875 sec bern2 | [Errno 111] Connection refused bern2 | [20/Mar/2024 13:25:33.150408] [75b4bb1d2380f2dd1937d48b18147d9d17323003802f948bd7668774] GNormPlus 0.00027942657470703125 sec bern2 | [Errno 111] Connection refused bern2 | Traceback (most recent call last): bern2 | File "/bern2local/bern2/bern2.py", line 107, in annotate_text bern2 | output = self.tag_entities(text, base_name) bern2 | File "/bern2local/bern2/bern2.py", line 368, in tag_entities bern2 | async_result = loop.run_until_complete(self.async_ner(arguments_for_coroutines)) bern2 | File "/usr/local/envs/bern2/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete bern2 | return future.result() bern2 | File "/bern2local/bern2/bern2.py", line 501, in async_ner bern2 | result = await asyncio.gather(coroutines) bern2 | File "/bern2local/bern2/bern2.py", line 543, in _ner_wrap bern2 | with open(output_mtner, 'r', encoding='utf-8') as f: bern2 | FileNotFoundError: [Errno 2] No such file or directory: './multi_ner/output/75b4bb1d2380f2dd1937d48b18147d9d17323003802f948bd7668774.PubTator.json' bern2 | bern2 | [20/Mar/2024 13:25:33.361152] id: 7c0a5071e6dfad824d09a5015a88ad12053f0a1cc02f0b4e139c1053 bern2 | [Errno 111] Connection refused bern2 | [20/Mar/2024 13:25:33.362602] [7c0a5071e6dfad824d09a5015a88ad12053f0a1cc02f0b4e139c1053] tmVar 2.0 0.00033664703369140625 sec bern2 | [Errno 111] Connection refused bern2 | [20/Mar/2024 13:25:33.362922] [7c0a5071e6dfad824d09a5015a88ad12053f0a1cc02f0b4e139c1053] GNormPlus 0.00026106834411621094 sec bern2 | [Errno 111] Connection refused bern2 | Traceback (most recent call last): bern2 | File "/bern2local/bern2/bern2.py", line 107, in annotate_text bern2 | output = self.tag_entities(text, base_name) bern2 | File "/bern2local/bern2/bern2.py", line 368, in tag_entities bern2 | async_result = loop.run_until_complete(self.async_ner(arguments_for_coroutines)) bern2 | File "/usr/local/envs/bern2/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete bern2 | return future.result() bern2 | File "/bern2local/bern2/bern2.py", line 501, in async_ner bern2 | result = await asyncio.gather(coroutines) bern2 | File "/bern2local/bern2/bern2.py", line 543, in _ner_wrap bern2 | with open(output_mtner, 'r', encoding='utf-8') as f: bern2 | FileNotFoundError: [Errno 2] No such file or directory: './multi_ner/output/7c0a5071e6dfad824d09a5015a88ad12053f0a1cc02f0b4e139c1053.PubTator.json' bern2 | bern2 | [2024-03-20 13:25:33,363] ERROR in app: Exception on /senddata [POST] bern2 | Traceback (most recent call last): bern2 | File "/usr/local/envs/bern2/lib/python3.9/site-packages/flask/app.py", line 1463, in wsgi_app bern2 | response = self.full_dispatch_request() bern2 | File "/usr/local/envs/bern2/lib/python3.9/site-packages/flask/app.py", line 872, in full_dispatch_request bern2 | rv = self.handle_user_exception(e) bern2 | File "/usr/local/envs/bern2/lib/python3.9/site-packages/flask/app.py", line 870, in full_dispatch_request bern2 | rv = self.dispatch_request() bern2 | File "/usr/local/envs/bern2/lib/python3.9/site-packages/flask/app.py", line 855, in dispatch_request bern2 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] bern2 | File "/bern2local/app/init.py", line 150, in send_data bern2 | _code, parse_res, keys_in_dict = r_parser.parse_result(result_dict, draw_keys, result_id=_pmid) bern2 | File "/bern2local/app/result_parser.py", line 210, in parse_result bern2 | org_text = result_dict['text'] bern2 | KeyError: 'text' bern2 | 172.22.5.41 - - [20/Mar/2024 13:25:33] "POST /senddata HTTP/1.1" 500 -

`

anopperl commented 8 months ago

I have check java was not install but after installing java again I am getting error

[20/Mar/2024 14:14:07.760634] id: db9142d9066766ed594dafa7f311b1760218f9a17d6ea489d248bc44 [Errno 111] Connection refused Traceback (most recent call last): File "/bern2local/bern2/bern2.py", line 107, in annotate_text output = self.tag_entities(text, base_name) File "/bern2local/bern2/bern2.py", line 368, in tag_entities async_result = loop.run_until_complete(self.async_ner(arguments_for_coroutines)) File "/usr/local/envs/bern2/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete return future.result() File "/bern2local/bern2/bern2.py", line 501, in async_ner result = await asyncio.gather(*coroutines) File "/bern2local/bern2/bern2.py", line 543, in _ner_wrap with open(output_mtner, 'r', encoding='utf-8') as f: FileNotFoundError: [Errno 2] No such file or directory: './multi_ner/output/db9142d9066766ed594dafa7f311b1760218f9a17d6ea489d248bc44.PubTator.json'

[20/Mar/2024 14:14:08.019669] id: 490de5248e3f15a44304ce8c75f4d3e83ba6d1f486250f04f9b931c3 [Errno 111] Connection refused Traceback (most recent call last): File "/bern2local/bern2/bern2.py", line 107, in annotate_text output = self.tag_entities(text, base_name) File "/bern2local/bern2/bern2.py", line 368, in tag_entities async_result = loop.run_until_complete(self.async_ner(arguments_for_coroutines)) File "/usr/local/envs/bern2/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete return future.result() File "/bern2local/bern2/bern2.py", line 501, in async_ner result = await asyncio.gather(*coroutines) File "/bern2local/bern2/bern2.py", line 543, in _ner_wrap with open(output_mtner, 'r', encoding='utf-8') as f: FileNotFoundError: [Errno 2] No such file or directory: './multi_ner/output/490de5248e3f15a44304ce8c75f4d3e83ba6d1f486250f04f9b931c3.PubTator.json'

[2024-03-20 14:14:08,021] ERROR in app: Exception on /senddata [POST] Traceback (most recent call last): File "/usr/local/envs/bern2/lib/python3.9/site-packages/flask/app.py", line 1463, in wsgi_app response = self.full_dispatch_request() File "/usr/local/envs/bern2/lib/python3.9/site-packages/flask/app.py", line 872, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/envs/bern2/lib/python3.9/site-packages/flask/app.py", line 870, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/envs/bern2/lib/python3.9/site-packages/flask/app.py", line 855, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] File "/bern2local/app/init.py", line 150, in send_data _code, parse_res, keys_in_dict = r_parser.parse_result(result_dict, draw_keys, result_id=_pmid) File "/bern2local/app/result_parser.py", line 210, in parse_result org_text = result_dict['text'] KeyError: 'text' 172.22.5.41 - - [20/Mar/2024 14:14:08] "POST /senddata HTTP/1.1" 500 -

anopperl commented 8 months ago

I am trying to run Bern2 in docker container (host has GPU)

RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx

mjeensung commented 8 months ago

@anopperl

Thank you for reporting the issue! Could you let us know if it works after installing the NVIDIA driver?

anopperl commented 8 months ago

@anopperl

Thank you for reporting the issue! Could you let us know if it works after installing the NVIDIA driver?

yes its working now