pysradb icon indicating copy to clipboard operation
pysradb copied to clipboard

Possible missing keys in esearch response results

Open andrewdavidsmith opened this issue 1 year ago • 1 comments

https://github.com/saketkc/pysradb/blob/0286ba9cf3d0f6e97b6d08baccf0bd36e11c650c/pysradb/sraweb.py#L340

I can't reproduce this, but I had a random event of:

File "/Users/aaaaaa/.venv/lib/python3.11/site-packages/pysradb/sraweb.py", line 339, in get_efetch_response
    n_records = int(esearch_response["esearchresult"]["count"])
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'count'

line numbers are off by one from the current repo, so I might be slightly behind on this error. Rerunning immediately after worked fine.

andrewdavidsmith avatar Jun 05 '23 21:06 andrewdavidsmith