IDLE (python 2.7) hangs for like 30secs and then I get that. That's discouraging:
Traceback (most recent call last):
File "/home/olivier/ROSALIND_scripts/uniprotTest.py", line 15, in <module>
response = urllib2.urlopen(request)
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 400, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1207, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 110] Connection timed out>
Thanks nevertheless. My aim is to get the records for the uniprot IDs, then I'll be able to manage. I guess I gotta try harder.
make sure to understand that the urlretrieve will only work if the URL exists and can be accessed say from a browser. It does not do anything more and it has no bioinformatics awareness.
For the second example you should edit your answer and include more of the code. It is impossible to troubleshoot as posted - we don't know all the ROSALIND examples by heart.
Thanks for the code. I have the following 'HTTPError: HTTP Error 405: Not Allowed' with urlopen. Hope you can help me with this?