[BioPython] Entrez.einfo error?
Nick Matzke
matzke at berkeley.edu
Mon Mar 16 15:42:22 EDT 2009
Looks like PubMed is down at the moment also, so it's all an NCBI
problem. Cheers!
Nick
Nick Matzke wrote:
> Hi all,
>
> This exact code worked fine for me on Friday, I wonder if it could be a
> temporary problem at Entrez? A similar problem seems to occur with
> other Entrez queries.
>
> Running biopython 1.49 in IPython...
>
> ============
> from Bio import Entrez
>
> Entrez.email = "matzke at berkeley.edu"
>
> handle = Entrez.einfo(db="structure")
>
>
> ---------------------------------------------------------------------------
> IOError Traceback (most recent call last)
>
> /bioinformatics/pyeg/<ipython console> in <module>()
>
> /Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/Bio/Entrez/__init__.pyc
> in einfo(cgi, **keywds)
> 195 variables = {}
> 196 variables.update(keywds)
> --> 197 return _open(cgi, variables)
> 198
> 199 def esummary(cgi=None, **keywds):
>
> /Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/Bio/Entrez/__init__.pyc
> in _open(cgi, params)
> 320 options = urllib.urlencode(params, doseq=True)
> 321 cgi += "?" + options
> --> 322 handle = urllib.urlopen(cgi)
> 323
> 324 # Wrap the handle inside an UndoHandle.
>
> /Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/urllib.pyc
> in urlopen(url, data, proxies)
> 80 opener = _urlopener
> 81 if data is None:
> ---> 82 return opener.open(url)
> 83 else:
> 84 return opener.open(url, data)
>
> /Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/urllib.pyc
> in open(self, fullurl, data)
> 188 try:
> 189 if data is None:
> --> 190 return getattr(self, name)(url)
> 191 else:
> 192 return getattr(self, name)(url, data)
>
> /Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/urllib.pyc
> in open_http(self, url, data)
> 323 if realhost: h.putheader('Host', realhost)
> 324 for args in self.addheaders: h.putheader(*args)
> --> 325 h.endheaders()
> 326 if data is not None:
> 327 h.send(data)
>
> /Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/httplib.pyc
> in endheaders(self)
> 858 raise CannotSendHeader()
> 859
> --> 860 self._send_output()
> 861
> 862 def request(self, method, url, body=None, headers={}):
>
> /Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/httplib.pyc
> in _send_output(self)
> 730 msg = "\r\n".join(self._buffer)
> 731 del self._buffer[:]
> --> 732 self.send(msg)
> 733
> 734 def putrequest(self, method, url, skip_host=0,
> skip_accept_encoding=0):
>
> /Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/httplib.pyc
> in send(self, str)
> 697 if self.sock is None:
> 698 if self.auto_open:
> --> 699 self.connect()
> 700 else:
> 701 raise NotConnected()
>
> /Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/httplib.pyc
> in connect(self)
> 665 msg = "getaddrinfo returns an empty list"
> 666 for res in socket.getaddrinfo(self.host, self.port, 0,
> --> 667 socket.SOCK_STREAM):
> 668 af, socktype, proto, canonname, sa = res
> 669 try:
>
> IOError: [Errno socket error] (7, 'No address associated with nodename')
> >
> /Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/httplib.py(667)connect()
>
> 666 for res in socket.getaddrinfo(self.host, self.port, 0,
> --> 667 socket.SOCK_STREAM):
> 668 af, socktype, proto, canonname, sa = res
>
>
>
>
>
> ipdb> record = Entrez.read(handle)
> *** NameError: name 'Entrez' is not defined
>
> ============
>
>
>
--
====================================================
Nicholas J. Matzke
Ph.D. student, Graduate Student Researcher
Huelsenbeck Lab
Center for Theoretical Evolutionary Genomics
4151 VLSB (Valley Life Sciences Building)
Department of Integrative Biology
University of California, Berkeley
Lab websites:
http://ib.berkeley.edu/people/lab_detail.php?lab=54
http://fisher.berkeley.edu/cteg/hlab.html
Dept. personal page:
http://ib.berkeley.edu/people/students/person_detail.php?person=370
Lab personal page: http://fisher.berkeley.edu/cteg/members/matzke.html
Lab phone: 510-643-6299
Dept. fax: 510-643-6264
Cell phone: 510-301-0179
Email: matzke at berkeley.edu
Mailing address:
Department of Integrative Biology
3060 VLSB #3140
Berkeley, CA 94720-3140
-----------------------------------------------------
"[W]hen people thought the earth was flat, they were wrong. When people
thought the earth was spherical, they were wrong. But if you think that
thinking the earth is spherical is just as wrong as thinking the earth
is flat, then your view is wronger than both of them put together."
Isaac Asimov (1989). "The Relativity of Wrong." The Skeptical Inquirer,
14(1), 35-44. Fall 1989.
http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm
====================================================
More information about the BioPython
mailing list