[Biopython-dev] Catching more error conditions in Bio.Entrez
Peter
biopython at maubp.freeserve.co.uk
Wed Jul 2 10:33:35 UTC 2008
Hello Michiel et al.,
I've already added a few if statements to the end of
Bio.Entrez._open() to catch a few errors I'd observed, and I've just
found another example:
>>> from Bio import Entrez
>>> Entrez.efetch("nucleotide", id="fiction", rettype="fasta").read()
'\n'
>>> Entrez.efetch("nucleotide", id="fiction").read()
'\n'
This seems to happen for any invalid identifier. Are you happy for me
to check for this as an error too? Are there any valid reasons to get
back an empty dataset like this?
Also, I was wondering if we should raise a ValueError rather than
IOError if we are fairly sure the problem is with the arguments rather
than the network or the sever being unavailable.
Peter
More information about the Biopython-dev
mailing list