BlueBrain / BlueBrain/Atlas-Download-Tools
Some RMA queries never return all results
- Dominant language
- Python
- Stars
- 17
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
The following code snippet sends a particular RMA query, for which the number of results returned by the server is always consistently smaller than the total number of results reported in the status part of the reponse:
```python
from atldld.requests import RMAParameters, rma_all
rma_parameters = RMAParameters(
"SectionDataSet",
criteria={
"specimen": {"donor": {"age": {"days": 56}}},
"probes": {"orientation": {"name": "Antisense"}}
},
)
msg = rma_all(rma_parameters)
```
* Number of results reported: `50476`
* Number of results received: `50274`
This leads to `rma_all` raising a `RuntimeError`:
```
Downloading the metadata for all results...
Traceback (most recent call last):
File "/Users/sschmidt/Code/BlueBrain/atldld/x.py", line 17, in
msg = rma_all(rma_parameters)
File "/Users/sschmidt/Code/BlueBrain/atldld/src/atldld/requests.py", line 187, in rma_all
raise RuntimeError("No data received")
RuntimeError: No data received
```
Given that the behaviour of not returning all results reported is reproducible we should probably not raise but only print a warning and still return the results received.
Contributor guide
Assessment
This issue has not been assessed yet.