Hello I have installed python 2.73 and Biopython 1.57 on Ubuntu 11.10. All of the Bio modules I have tried are working fine, except for the Entrez. None of the e-utils are working - the online tests failed after the installation of biopython. Do I have to register to use the E-utils? Even when I try try "urllib.urlopen('http://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi')", idle-python hangs..(But the url works on Firefox.) Changing socket defaulttimeout doesn't help either. Here's what I get when I try einfo()
>>> from Bio import Entrez
>>> Entrez.email = 'my_email_address'
>>> handle = Entrez.einfo()
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
handle = Entrez.einfo()
File "/usr/lib/pymodules/python2.7/Bio/Entrez/__init__.py", line 186, in einfo
return _open(cgi, variables)
File "/usr/lib/pymodules/python2.7/Bio/Entrez/__init__.py", line 358, in _open
handle = urllib2.urlopen(cgi)
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 394, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 412, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 372, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1201, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1171, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 110] Connection timed out>
Grateful if you could help.
Thanks for the help. I've tried disabling my firewall, but the problem is still unchanged. I wonder why the link works in firefox but not through biopython. I've read it could be a proxy problem. I have the proxy address of my ISP but I not sure how to set it up. I'm not very familiar with these. I tried to set up the default http port with the ISP's ip 'xxx.xxx.xxx.xxx:80' but it does not work. (When I ping the proxy it doesn't reply back.) Here's how I tried it on python:
Grateful if you could help. I'm stuck at this part of the biopython tutorial.
Have you checked if you can use Python's urllib to connect to ANY website? That will tell you if this is an NCBI specific problem, or more general.
as Peter says try:
It hangs for ncbi, but when i tried an article on wikipedia, it works. 'yahoo.com' also works
...etc
What can I do?
Hello Can somebody help? I'm still stuck, not being able to access anything on NCBI using Biopython. Tried to contact NCBI helpdesk to know if I'm blocked, but I have got no reply.
this is a problem on your system - for some reason you are not allowed to connect. Move to a different computer on a different network.
Thanks. I'll try a different network tomorrow. Could it it be because I'm behind a router that it's not working?
Finally found the answer :-) I only had to add the e-utils IP as proxy. And it works. I hope it's the right procedure.
Thanks a lot for your help Istvan and Peter.