[BioPython] Bioregistry...doesn't work with me
Jan T. Kim
jtk at cmp.uea.ac.uk
Fri Apr 1 09:24:14 EST 2005
On Fri, Apr 01, 2005 at 03:04:15PM +0200, Aur?lie Bornot wrote:
>
> I am trying to retrieve sequences with the script of the CookBook and it doesn't work...
> I don't understand why....
> Can someone tell me what I did wrong ?
[deleted output of print commands]
> >>> from Bio import db
> >>> print db
> >>> db.keys()
> >>> sp = db["swissprot"]
> >>> sp
> <Bio.config.DBRegistry.DBGroup instance at 0x00ACEB48>
> >>> record_handle = sp['O23729']
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "C:\Python24\lib\site-packages\Bio\config\DBRegistry.py", line 150, in __
> getitem__
> data = self._run_serial(key)
> File "C:\Python24\lib\site-packages\Bio\config\DBRegistry.py", line 217, in _r
> un_serial
> raise KeyError, "I could not get any results."
> KeyError: 'I could not get any results.'
>
>
> I have verified : the entry O23729 is still correct....
Your example works for me:
>>> record_handle = sp['O23729']
>>> record_handle
<StringIO.StringIO instance at 0xf66b7c2c>
>>> print record_handle.readline()
ID CHS3_BROFI STANDARD; PRT; 394 AA.
>>> print record_handle.readline()
AC O23729;
>>> print record_handle.readline()
DT 15-JUL-1999 (Rel. 38, Created)
> I must work with Windows XP, may the problem comes from this...?
That's always a possiblility (I've tried on Linux), but it's more likely
a network problem, Biopython may have been unable to get the record
because e.g.
* you are behind some firewall that doesn't allow the kind of http
used by Biopython for retrieving the record
* the network connectivity between your site and www.expasy.ch
may have been transiently down
Best regards, Jan
--
+- Jan T. Kim -------------------------------------------------------+
| *NEW* email: jtk at cmp.uea.ac.uk |
| *NEW* WWW: http://www.cmp.uea.ac.uk/people/jtk |
*-----=< hierarchical systems are for files, not for humans >=-----*
More information about the BioPython
mailing list