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

[BUG] KeyError: '@url' #161

Closed
Maarten-vd-Sande opened this issue Jun 2, 2022 · 4 comments
Closed

[BUG] KeyError: '@url' #161

Maarten-vd-Sande opened this issue Jun 2, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@Maarten-vd-Sande
Copy link
Contributor

executing

import pysradb

sample = "DRR138929"

db_sra = pysradb.SRAweb()
db_sra.sra_metadata([sample], detailed=True)

leads to

Traceback (most recent call last):
  File "/home/sande/Desktop/seq2science/pysradb_script.py", line 6, in <module>
    db_sra.sra_metadata([sample], detailed=True)
  File "/home/sande/anaconda3/envs/pysradb/lib/python3.9/site-packages/pysradb/sraweb.py", line 581, in sra_metadata
    detailed_record["sra_url"] = sra_files["@url"]
KeyError: '@url'

A couple of weeks ago this worked fine for this sample. Not sure if related but it seems like the sample cannot be downloaded on AWS anymore, https://trace.ncbi.nlm.nih.gov/Traces/sra/?run=DRR138929. Other samples from this project don't have this problem.. Idk if the data is being migrated or something?

@Maarten-vd-Sande Maarten-vd-Sande added the bug Something isn't working label Jun 2, 2022
@saketkc
Copy link
Owner

saketkc commented Jun 2, 2022

Thanks, I can confirm this is a bug, but is arising from upstream changes. Will have a fix soon

@Maarten-vd-Sande
Copy link
Contributor Author

Any clue what is being changed? Should I be worried that I won't be able to download from url anymore? 😛

@saketkc
Copy link
Owner

saketkc commented Jun 5, 2022

This should be fixed in v1.4 - NCBI is moving everything to the cloud (GCP/AWS) so some SRA cloud links are no longer available.

@saketkc saketkc closed this as completed Jun 5, 2022
@Maarten-vd-Sande
Copy link
Contributor Author

Maarten-vd-Sande commented Jun 7, 2022

⚡ Thanks for the fast replies and fix!!! ⚡ Awesome

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

2 participants