-
Notifications
You must be signed in to change notification settings - Fork 3
Description
I built this docker image and ran.
It works well except gene normalizer couldn't find gene IDs when http get request. like bellow.
http://localhost:8008/?pmid=30429604&format=pubtator
But when I do post request, I can't got any result.
I did like this
python code:
import json
import requests
server = 'localhost:8008'
abstract = 'CD95L is a transmembrane ligand (m-CD95L) that is cleaved by metalloproteases to release a soluble ligand (s-CD95L). Unlike m-CD95L, interaction between s-CD95L and CD95 fails to recruit caspase-8 and FADD to trigger apoptosis and instead induces a Ca2+ response via docking of PLCgamma1 to the calcium-inducing domain (CID) within CD95. '
param = {'param':json.dumps({'text':abstract})}
NERRequest = requests.post(server, data = param)
print (NERRequest .text)
This did't print any result.
So I saw log, recorded like this
nohup_BERN.out:
Exception happened during processing of request from ('172.17.0.1', 35880)
Traceback (most recent call last):
File "/usr/lib/python3.5/socketserver.py", line 625, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.5/socketserver.py", line 681, in init
self.handle()
File "/usr/lib/python3.5/http/server.py", line 422, in handle
self.handle_one_request()
File "/usr/lib/python3.5/http/server.py", line 410, in handle_one_request
method()
File "server.py", line 317, in do_POST
text, cur_thread_name, is_raw_text=True, reuse=False)
File "server.py", line 452, in tag_entities
self.biobert_recognize(dict_list, is_raw_text, cur_thread_name)
File "server.py", line 490, in biobert_recognize
thread_id=cur_thread_name)
File "/app/biobert_ner/utils.py", line 15, in with_profiling
ret = fn(*args, **kwargs)
File "/app/biobert_ner/run_ner.py", line 488, in recognize
with open(token_path, 'r') as reader:
FileNotFoundError: [Errno 2] No such file or directory: 'biobert_ner/tmp/token_test_Thread-54.txt'
GET method worked well, but POST method did'nt work.
When GET method, txt file was in directory 'biobert_ner/tmp/' , and was immediately removed.
But POST method didn't make any file in that directory,
What was wrong?
Could you fix this?
Thanks your effort.