Skip to content

Some RMA queries never return all results #98

@Stannislav

Description

@Stannislav

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:

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 <module>
    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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions