MedCATtrainer
MedCATtrainer copied to clipboard
Unable to add annotation.
After following the readme instructions to set up the interface and setup an annotation project, I upload one of the example datasets. Once in the actual annotation interface, I highlight a span, and right click which gives me an option to "add term" instead of an option to "add annotation" like is mentioned in the readme. Thinking its just an aesthetic change, I select a concept from the dropdown, but when I click "add term", nothing happens and I get the following message:
nginx_1 | 2021/07/07 16:32:19 [error] 24#24: *151 upstream prematurely closed connection while reading response header from upstream, client: 172.20.0.1, server: localhost, request: "POST /api/add-annotation/ HTTP/1.1", upstream: "http://172.20.0.2:8000/api/add-annotation/", host: "localhost:8001", referrer: "http://localhost:8001/train-annotations/1/1" nginx_1 | 172.20.0.1 - - [07/Jul/2021:16:32:19 +0000] "POST /api/add-annotation/ HTTP/1.1" 502 552 "http://localhost:8001/train-annotations/1/1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" medcattrainer | DAMN ! worker 1 (pid: 135) died, killed by signal 9 :( trying respawn ... medcattrainer | Respawned uWSGI worker 1 (new pid: 136)
hi - 'Add Annotation' to 'Add Term' is an aesthetic change. I'll update the README to reflect that.
Could you show the error from the app container?
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9ebf974b4529 cogstacksystems/medcat-trainer-nginx:latest "/docker-entrypoint.…" 16 minutes ago Up 16 minutes 80/tcp, 0.0.0.0:8001->8000/tcp medcattrainer_nginx 04b06376a0b8 cogstacksystems/medcat-trainer:latest "/home/run.sh" 16 minutes ago Up 16 minutes 8000/tcp medcattrainer $ docker logs 04b06376a0b8
Hi! I have encountered similar problem for adding term. For example, I want to add a term for "gait instability". I first searched in concept lookup field, but nothing I want came up. Then I tried to type the name "Gait, unsteady" and CUI "C0231686". But I got the error: "Cannot add a concept "Gait, unsteady" with cui:C0231686. CUI already linked to {'unsteady~gait'}". When search "unsteady~gait" in the concept lookup field, nothing comes up. So I am not able to add this term. Could you please let me know how to solve the problem?