ranking-agent / aragorn

A Translator ARA combining asynchronous database querying, answer coalescence, and answer ranking.
MIT License
4 stars 3 forks source link

Running a creativity mode query with a specified chemical identifier and unspecified disease fails. #148

Open DnlRKorn opened 1 year ago

DnlRKorn commented 1 year ago

The following query failed with the attached 500 error (I'm not 100% sure we care about supporting this type of query in general, it isn't critical for any process I'm doing right now, but this definitely looks like a bug and not a rejection)

Query: { "message": { "query_graph": { "nodes": { "chemical": { "ids": [ "PUBCHEM.COMPOUND:23925" ] }, "disease": { "ids": null, "categories": [ "biolink:Disease" ] } }, "edges": { "t_edge": { "object": "disease", "subject": "chemical", "predicates": [ "biolink:treats" ], "knowledge_type": "inferred" } } } } }

Response: { "message": { "query_graph": { "nodes": { "chemical": { "ids": [ "PUBCHEM.COMPOUND:23925" ] }, "disease": { "ids": null, "categories": [ "biolink:Disease" ] } }, "edges": { "t_edge": { "subject": "chemical", "object": "disease", "knowledge_type": "inferred", "predicates": [ "biolink:treats" ] } } } }, "logs": [ { "timestamp": "2023-01-10T15:08:59.836518", "level": "INFO", "message": "pid: 5226fefa8d95", "code": null }, { "timestamp": "2023-01-10T15:08:59.838912", "level": "ERROR", "message": "Exception 'NoneType' object is not subscriptable", "code": null } ], "pid": "5226fefa8d95" }

DnlRKorn commented 1 year ago

This function addresses this issue

https://github.com/ranking-agent/aragorn/blob/250b32a47827049f82fe1d804fba9171d478ae7c/src/service_aggregator.py#L584

cbizon commented 1 year ago

This should be fixed on the renci deployments. @DnlRKorn can you confirm?