api-python icon indicating copy to clipboard operation
api-python copied to clipboard

[BUG] Query error: cell missing value {}

Open mengzhensun opened this issue 5 years ago • 0 comments

Describe the bug The python api throws the missing value error to my SPARQL query:

SELECT ?name ?proteinExpressionScore
WHERE {
  ?a typeOf HumanProteinOccurrence .
  ?a name ?name .
  ?a proteinExpressionScore ?proteinExpressionScore .
}
LIMIT 2

To Reproduce Steps to reproduce the behavior:

  1. Go to a Colab notebook
  2. run
!pip install --upgrade --quiet datacommons
# Import Data Commons
import datacommons as dc
root = 'https://api.datacommons.org'

SELECT ?name ?proteinExpressionScore
WHERE {
  ?a typeOf HumanProteinOccurrence .
  ?a name ?name .
  ?a proteinExpressionScore ?proteinExpressionScore .
}
LIMIT 2
  1. See error

Expected behavior

result = [{'?name': '2ABD_HUMAN_Pancreas_ExocrineGlandularCells', '?proteinExpressionScore': 'ProteinExpressionLow'},
 {'?name': '2A5G_HUMAN_Bronchus_RespiratoryEpithelialCells', '?proteinExpressionScore': 'ProteinExpressionMedium'}]

Screenshots Missing value error: https://screenshot.googleplex.com/fa799d8a-84fb-4972-a73d-c680861d19af Response error: https://screenshot.googleplex.com/54176345-fe07-4c5d-91aa-01536ab01141 Additional context Response error occurs sometimes for the same query as well, as shown in the second screenshoot.

mengzhensun avatar Aug 13 '20 18:08 mengzhensun