saketkc / pysradb

Package for fetching metadata and downloading data from SRA/ENA/GEO
https://saketkc.github.io/pysradb
BSD 3-Clause "New" or "Revised" License
313 stars 51 forks source link

Failure of metadata #222

Open andrewdavidsmith opened 1 month ago

andrewdavidsmith commented 1 month ago

Describe the bug Failure of metadata on some SRA accessions when VALUE is not a key for value_x.

To Reproduce

$ pysradb metadata --detailed ERP009821
Traceback (most recent call last):
  File "/code/external/pysradb/.venv/bin/pysradb", line 8, in <module>
    sys.exit(parse_args())
             ^^^^^^^^^^^^
  File "/code/external/pysradb/pysradb/cli.py", line 1173, in parse_args
    metadata(
  File "/code/external/pysradb/pysradb/cli.py", line 69, in metadata
    df = sradb.sra_metadata(
         ^^^^^^^^^^^^^^^^^^^
  File "/code/external/pysradb/pysradb/sraweb.py", line 596, in sra_metadata
    value = value_x["VALUE"]
            ~~~~~~~^^^^^^^^^
KeyError: 'VALUE'

Desktop (please complete the following information):

Additional context pysradb version: clone at 35dbf24