TranslatorSRI / NodeNormalization

Service that produces Translator compliant nodes given a curie
MIT License
9 stars 6 forks source link

Certain 'PR:' curies throw "Error occurred during processing" on /get_normalized_nodes #179

Closed amykglen closed 1 year ago

amykglen commented 1 year ago

you can reproduce this with:

curl -X 'GET' \
  'https://nodenormalization-sri.renci.org/1.3/get_normalized_nodes?curie=PR%3AQ18PI6&conflate=true' \
  -H 'accept: application/json'

it returns this response:

{
  "detail": "Error occurred during processing."
}

some curies this seems to happen with are:

PR:Q18PI6
PR:Q15726
PR:Q1L6U9
PR:Q18CF3

it's not a problem if the NodeNormalizer doesn't recognize these curies, but I'd think ideally it would just return null for them, instead of throwing an error?

thanks!

gaurav commented 1 year ago

Thanks so much for reporting this, Amy! NodeNorm is supposed to return null if it doesn't recognize a CURIE (see e.g. https://nodenormalization-sri.renci.org/1.3/get_normalized_nodes?curie=PR%3AQ18PI&conflate=true).

This appears to be a bug we see in the logs sometimes, which presents as:

INFO:     172.25.13.151:56590 - "GET /docs HTTP/1.1" 200 OK
INFO:     172.25.13.151:56588 - "GET /docs HTTP/1.1" 200 OK
get_normalized_nodes: 2023-03-17 20:55:01,407 Exception: 'NoneType' object has no attribute 'startswith'
ERROR:node_normalizer.normalizer:Exception: 'NoneType' object has no attribute 'startswith'
INFO:     10.11.92.76:35848 - "GET /get_normalized_nodes?curie=PR%3AQ18PI6&conflate=true HTTP/1.1" 500 Internal Server Error

The good news is that this bug isn't present on NodeNorm Prod (see tests below) despite running the exact same version of the NodeNorm software, so it must be something to do with the way the Redis backends are set up or have been loaded. We're currently reloading data on RENCI, so hopefully that will solve this bug by itself. Whether or not it does, I'm planning to add your examples to the NodeNorm test suite so that we can check if the problem reoccurs.

Thanks again!

Examples CURIEs on Transltr.io

amykglen commented 1 year ago

ah, thanks for the quick response, and pointing out that it works on the Prod service! I'll use that.

gaurav commented 1 year ago

Hi @amykglen -- we just reloaded the 2022dec2 release into https://nodenormalization-sri.renci.org/docs, and all four of the example CURIEs are working now! Could you please confirm that this endpoint is working correctly for you?

amykglen commented 1 year ago

yes, this issue appears to be resolved! thank you!