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

Better user-facing messages on invalid IDs #1

Open
areejalsheikh opened this issue Aug 14, 2018 · 2 comments
Open

Better user-facing messages on invalid IDs #1

areejalsheikh opened this issue Aug 14, 2018 · 2 comments

Comments

@areejalsheikh
Copy link

Hi,

Thanks for this awesome tool. Could you please help with the following error?

I just tried to run the command in the README

ncbi-acc-download AB_12345

but I got the error:

raise DownloadError("Download failed with return code: {}".format(r.status_code))

ncbi_acc_download.core.DownloadError: Download failed with return code: 400

No problems showing the help message ncbi-acc-download -h.

Thanks,
Areej

@kblin
Copy link
Owner

kblin commented Sep 24, 2018

Hi there,

Sorry I missed this issue before. AB_12345 is just a made up ID I use as an example. If you use a real GenBank or RefSeq ID, that should work. E.g. ncbi-acc-download NC_003888 should download the Streptomyces coelicolor genome.

@kblin kblin changed the title ncbi_acc_download.core.DownloadError: Download failed with return code: 400 Better user-facing messages on invalid IDs Jan 5, 2019
@tseemann
Copy link

tseemann commented Oct 1, 2019

Can you not print the giant traceback?
The error is clear, but lost amongst the noise.

% ncbi-acc-download GCA_001691195.1

Failed to download file with id GCA_001691195.1 from NCBI
Traceback (most recent call last):
  File "/home/linuxbrew/.linuxbrew/bin/ncbi-acc-download", line 11, in <module>
    load_entry_point('ncbi-acc-download==0.2.5', 'console_scripts', 'ncbi-acc-download')()
  File "/home/linuxbrew/.linuxbrew/opt/python/lib/python3.7/site-packages/ncbi_acc_download/__main__.py", line 54, in main
    download_to_file(dl_id, config, filename, append)
  File "/home/linuxbrew/.linuxbrew/opt/python/lib/python3.7/site-packages/ncbi_acc_download/core.py", line 110, in download_to_file
    r = get_stream(url, params)
  File "/home/linuxbrew/.linuxbrew/opt/python/lib/python3.7/site-packages/ncbi_acc_download/download.py", line 90, in get_stream
    raise DownloadError("Download failed with return code: {}".format(r.status_code))
ncbi_acc_download.errors.DownloadError: Download failed with return code: 400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants