ranking-agent / robokop-ara

0 stars 1 forks source link

ROBOKOP-ARA Fails when submitting a query where node with ids:null #44

Open DnlRKorn opened 1 year ago

DnlRKorn commented 1 year ago

Submitting the following query to the ROBOKOP ARA { "message": { "query_graph": { "nodes": { "disease": { "ids": [ "MONDO:0011399" ] }, "chemical": { "ids": null, "categories": [ "biolink:ChemicalEntity" ] } }, "edges": { "t_edge": { "subject": "chemical", "object": "disease", "predicates": [ "biolink:treats" ] } } } } }

Results in the following error

{ "message": { "query_graph": { "nodes": { "disease": { "ids": [ "MONDO:0011399" ] }, "chemical": { "ids": null, "categories": [ "biolink:ChemicalEntity" ] } }, "edges": { "t_edge": { "subject": "chemical", "object": "disease", "predicates": [ "biolink:treats" ] } } } }, "logs": [ { "timestamp": "2022-12-16T15:07:05.603499", "level": "INFO", "message": "pid: 4adb0aca00a0", "code": null }, { "timestamp": "2022-12-16T15:07:05.606698", "level": "ERROR", "message": "Exception 'NoneType' object is not iterable", "code": null } ], "pid": "4adb0aca00a0" }

Discussions with Yaphet has shown that it's very likely the ids field caused this error. This is a problem because when submitting an async query, a blank ids is automatically filled with null.

Think this line is the culprit. https://github.com/ranking-agent/robokop-ara/blob/ce5ab1726a642a3055d6c9b05a3ceba762580a54/app/identifiers.py#L53