[Biopython] 400 error, Did Entrez block me or is it something else?

David Shin davidsshin at lbl.gov
Thu Dec 5 12:05:00 UTC 2013


Hi all -

During off peak times, I was working on a script that takes a list of gi
numbers (a list of 8) for protein sequences to use as input to get fasta
sequences via Entrez.efetch. I passed along my email address during the
searches. I am still new to python, etc. so had been testing my program.

At some point I started getting the error below, and I'm not sure if it is
my program, my web provider, or if ncbi got mad at me. It's been like this
for about an hour, so giving up for the night.

Thanks

error:

Traceback (most recent call last):
  File "../gi-to-fasta5.py", line 11, in <module>
    handle = Entrez.efetch(db="protein", rettype="fasta", retmode="text",
id=gi_numbers)
  File
"/Users/daanac/onda/lib/python2.7/site-packages/Bio/Entrez/__init__.py",
line 144, in efetch
    return _open(cgi, variables, post)
  File
"/Users/daanac/onda/lib/python2.7/site-packages/Bio/Entrez/__init__.py",
line 460, in _open
    raise exception
urllib2.HTTPError: HTTP Error 400: Bad Request





-- 
David Shin, Ph.D
Lawrence Berkeley National Labs
1 Cyclotron Road
MS 83-R0101
Berkeley, CA 94720
USA



More information about the Biopython mailing list