-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileNotFoundError when using POST method #2
Comments
Looks like this is also Bern related. See here |
Your bern-docker runs well? Could you test Post method like above in your system? |
I just ran it, and all my sample calls from this project's readme file work. I think your issue is related to this --> dmis-lab/bern#17 |
Yes. I know your smaple calls in readme file all works. If you call your bern-docker by POST method, you cannot get any results.
|
@amalic Please what was the problem with directories that you mentioned in BERN repository? I think it might fix this issue. I'm running into the same problem: FileNotFoundError: [Errno 2] No such file or directory: 'biobert_ner/tmp/token_test_Thread-10.txt' |
disabling gnormal and tmvar2 by editing server.py.
So It runs.
But results are slighly different with original bern.
I don't know why runs it like this.
2020년 9월 24일 (목) 오후 6:20, Alejandro Vaca <[email protected]>님이 작성:
… @amalic <https://github.com/amalic> Please what was the problem with
directories that you mentioned in BERN repository? I think it might fix
this issue. I'm running into the same problem: FileNotFoundError: [Errno 2]
No such file or directory: 'biobert_ner/tmp/token_test_Thread-10.txt'
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQDU6OLNOCVQIHI44RMQMXDSHMFNLANCNFSM4OMSUNSQ>
.
|
Could you please show me how to disable gnormal and tmvar2 in server.py? |
I attached an edited server.py file by gmail.
Can you see it?
If you can't download it, send me a mail to [email protected].
Then I'll send a file to you.
2020년 9월 24일 (목) 오후 11:42, Alejandro Vaca <[email protected]>님이 작성:
… Could you please show me how to disable gnormal and tmvar2 in server.py?
Thank you very much for your reply, really. I've been struggling with this
since yesterday and I don't find the bug...
I think it's clear that run_ner.py is trying to use a token.txt placed in
biobert_ner/tmp/, but I don't see the process where this token is supposed
to be saved in that directory...
What's obvious to me is that the authors of the original BERN might have
solved the issue, as when calling their service everything works fine,
however I've found that most of the users that are deploying their own
servers are encountering this issue...
@shipse92 <https://github.com/shipse92>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQDU6OMA77YDZN5QKQ53J2DSHNLGVANCNFSM4OMSUNSQ>
.
|
I cannot see it :( I'll send you an email! Thank you very much :) @shipse92 |
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.
The text was updated successfully, but these errors were encountered: