RENCI-AUTOMAT / Automat-server

MIT License
0 stars 0 forks source link

500 for valid query #4

Closed cbizon closed 3 years ago

cbizon commented 3 years ago

This query is throwing a 500 in automat/ubergraph:

{
    "message": {
        "query_graph": {
            "nodes": {
                "n1": {
                    "id": "HP:0033127",
                    "category": "biolink:PhenotypicFeature",
                    "is_set": false
                },
                "n2": {
                    "category": "biolink:Disease",
                    "is_set": false
                }
            },
            "edges": {
                "e02": {
                    "subject": "n1",
                    "object": "n2",
                    "predicate": "biolink:affected_by"
                }
            }
        }
    }
}

If I remove the predicate, it returns (0 results). I suspect, therefore, an issue with the transpiler, but I'm not certain of that.

cbizon commented 3 years ago

@patrickkwang heads up

patrickkwang commented 3 years ago

I'm not seeing any transpiler issues with this immediately. Do we expect that there should be results?

cbizon commented 3 years ago

No, no results. but also not a 500...

YaphetKG commented 3 years ago

Current deployment of automat errors out on transplier, but the latest reasoner transplier deployed at (automat-dev.edc.renci.org ) works for the same query

curl -X POST "https://automat-dev.edc.renci.org/uberongraph/query" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"message\":{\"query_graph\":{\"nodes\":{\"n1\":{\"id\":\"HP:0033127\",\"category\":\"biolink:PhenotypicFeature\",\"is_set\":false},\"n2\":{\"category\":\"biolink:Disease\",\"is_set\":false}},\"edges\":{\"e02\":{\"subject\":\"n1\",\"object\":\"n2\",\"predicate\":\"biolink:affected_by\"}}}}}"

Error on current dep:

...
File "/home/plater/Plater/PLATER/services/util/question.py", line 37, in answer
    cypher = self.compile_cypher()
  File "/home/plater/Plater/PLATER/services/util/question.py", line 29, in compile_cypher
    return get_query(self._question_json[Question.QUERY_GRAPH_KEY])
  File "/usr/local/lib/python3.8/site-packages/reasoner/cypher.py", line 182, in get_query
    query = transpile_compound(qgraph, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/reasoner/cypher.py", line 34, in transpile_compound
    return match_query(
  File "/usr/local/lib/python3.8/site-packages/reasoner/matching.py", line 279, in match_query
    clauses.append(match_edge(
  File "/usr/local/lib/python3.8/site-packages/reasoner/matching.py", line 229, in match_edge
    eref = EdgeReference(qedge_id, qedge)
  File "/usr/local/lib/python3.8/site-packages/reasoner/matching.py", line 141, in __init__
    self.directed = any(
  File "/usr/local/lib/python3.8/site-packages/reasoner/matching.py", line 142, in <genexpr>
    not bmt.get_element(space_case(predicate[8:])).symmetric
AttributeError: 'NoneType' object has no attribute 'symmetric'

Should work once newest plater is deployed

cbizon commented 3 years ago

Hmm, I'm still getting a 500 on automat/ubergraph

YaphetKG commented 3 years ago

hi @cbizon , is the 500 happening for the same trapi query ?

cbizon commented 3 years ago

Yeah, same message - is it working for you?

cbizon commented 3 years ago

Oops, it was me - this is fixed.