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: 'EXPERIMENT_PACKAGE_SET' #68

Closed
Maarten-vd-Sande opened this issue Sep 16, 2020 · 4 comments · Fixed by #69
Closed

[BUG] KeyError: 'EXPERIMENT_PACKAGE_SET' #68

Maarten-vd-Sande opened this issue Sep 16, 2020 · 4 comments · Fixed by #69
Labels
bug Something isn't working

Comments

@Maarten-vd-Sande
Copy link
Contributor

Maarten-vd-Sande commented Sep 16, 2020

Describe the bug
version 0.11.1-dev0

import pysradb

db = pysradb.SRAweb()
db.sra_metadata("SRP098789", detailed=True)

Traceback (most recent call last):
  File "script", line 4, in <module>
    db.sra_metadata("SRP098789", detailed=True)
  File "/home/maarten/anaconda3/envs/seq2science/lib/python3.7/site-packages/pysradb/sraweb.py", line 456, in sra_metadata
    efetch_result = self.get_efetch_response("sra", srp)
  File "/home/maarten/anaconda3/envs/seq2science/lib/python3.7/site-packages/pysradb/sraweb.py", line 323, in get_efetch_response
    response = xmltodict.parse(request_text)["EXPERIMENT_PACKAGE_SET"][
KeyError: 'EXPERIMENT_PACKAGE_SET'
@Maarten-vd-Sande Maarten-vd-Sande added the bug Something isn't working label Sep 16, 2020
@Maarten-vd-Sande
Copy link
Contributor Author

I am also pretty sure that today I got KeyError: 'EXPERIMENT_PACKAGE' before (the key one line farther), but I guess that's related to this one

@Maarten-vd-Sande
Copy link
Contributor Author

Maarten-vd-Sande commented Sep 16, 2020

A call to efetch gave me this result, so it seems like ncbi is down-ish. Would be nice if pysradb catches this more "gracefully", but that's a minor detail.

500 Internal Server Error

No do_post output returned from 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=sra&query_key=1&WebEnv=MCID_5f6236a16761b17fe3514db7&rettype=&retmode=text&retstart=0&retmax=1&edirect_os=linux&edirect=11.0&tool=edirect&email=jenkins@ocimum'

I think I can close this as it seems something goes wrong at ncbi side?

@saketkc
Copy link
Owner

saketkc commented Sep 16, 2020

Thanks @Maarten-vd-Sande, this indeed is arising from NCBI (I was unable to replicate it locally just now). #69 should hopefully throw out better failure messages.

@Maarten-vd-Sande
Copy link
Contributor Author

Awesome! Thanks for these fast fixes and replies ⚡ !

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

Successfully merging a pull request may close this issue.

2 participants