Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure of metadata #222

Open
andrewdavidsmith opened this issue Oct 25, 2024 · 0 comments
Open

Failure of metadata #222

andrewdavidsmith opened this issue Oct 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@andrewdavidsmith
Copy link
Collaborator

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):

  • OS: Ubuntu 20.04
  • Python version 3.12

Additional context
pysradb version: clone at 35dbf24

@andrewdavidsmith andrewdavidsmith added the bug Something isn't working label Oct 25, 2024
andrewdavidsmith added a commit to andrewdavidsmith/pysradb that referenced this issue Oct 25, 2024
…y in the value_x dict; this works for the test case in issue saketkc#222
saketkc added a commit that referenced this issue Oct 25, 2024
* pysradb/sraweb.py: adding a default None value when VALUE is not a key in the value_x dict; this works for the test case in issue #222

* Drop Python 3.7, 3.8

* Update release notes

* Update release notes

* Suppress ena search test

---------

Co-authored-by: Saket Choudhary <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant