1

I'm having a issue using Bio.Entrez to search a protein. I'm doing this:

>>> handle=Entrez.esearch(db="protein", term="insulin AND homo")
>>> record=Entrez.read(handle)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/Bio/Entrez/__init__.py", line 351, in read
    record = handler.read(handle)
  File "/usr/lib/pymodules/python2.7/Bio/Entrez/Parser.py", line 169, in read
    self.parser.ParseFile(handle)
  File "/usr/lib/pymodules/python2.7/Bio/Entrez/Parser.py", line 307, in endElementHandler
    raise RuntimeError(value)
RuntimeError: Search Backend failed: Database is not supported: protein

I'm having a issue with einfo() too, check at this:

>>> handler=Entrez.einfo(db="protein")
>>> record=Entrez.read(handler)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/Bio/Entrez/__init__.py", line 351, in read
    record = handler.read(handle)
  File "/usr/lib/pymodules/python2.7/Bio/Entrez/Parser.py", line 169, in read
    self.parser.ParseFile(handle)
  File "/usr/lib/pymodules/python2.7/Bio/Entrez/Parser.py", line 285, in startElementHandler
    raise ValidationError(name)
Bio.Entrez.Parser.ValidationError: Failed to find tag 'Build' in the DTD. To skip all tags that are not represented in the DTD, please call Bio.Entrez.read or Bio.Entrez.parse with validate=False.

Why is protein database not supported? Can somebody help me with this issue?

David Robinson
  • 77,383
  • 16
  • 167
  • 187
alejo0317
  • 83
  • 2
  • 9
  • Cannot reproduce the first issue with BioPython 1.60. (Are you certain that opening your Python terminal and pasting in `from Bio import Entrez; Entrez.email = "dgrtwo@princeton.edu"; handle=Entrez.esearch(db="protein", term="insulin AND homo"); record=Entrez.read(handle); print record` causes that error?) – David Robinson Jan 26 '13 at 03:00
  • >>> print Bio.__version__ 1.60 Entrez.email = "dgrtwo@princeton.edu"; handle=Entrez.esearch(db="protein", term="insulin AND homo"); record=Entrez.read(handle); print record Traceback (most recent call last): File "", line 1, in File "/usr/lib/pymodules/python2.7/Bio/Entrez/__init__.py", line 351, in read record = handler.read(handle) File "/usr/lib/pymodules/python2.7/Bio/Entrez/Parser.py", line 169, in read .... RuntimeError: Search Backend failed: Database is not supported: protein Yes, still the same error. Did you compile Biopython or install from repositories? – alejo0317 Jan 26 '13 at 03:03
  • OK, this is strange. Running the same code a couple of times caused it to sometimes cause the error and sometimes not. Can you try running that first code again? – David Robinson Jan 26 '13 at 03:03
  • I installed using `pip install biopython` (freshly right now) – David Robinson Jan 26 '13 at 03:04
  • I used "aptitude install python-biopython" but is always generating the same error, maybe I should compile ... – alejo0317 Jan 26 '13 at 03:05
  • I downloaded, compiled and installed from the official web, and running the same code a couple of times caused it to sometimes cause the error and sometimes not. That's really strange. – alejo0317 Jan 26 '13 at 03:31
  • you could also ask http://www.biostars.org – Pierre Jan 26 '13 at 10:03

1 Answers1

1

Also raised on the Biopython mailing list, and apparently working now: http://lists.open-bio.org/pipermail/biopython/2013-January/008306.html

We think this was a transient problem at the NCBI.

Peter Cock
  • 1,585
  • 1
  • 9
  • 14