[Biopython-dev] NCBIStandalon not compatible with previous versions, is this a bug?

Sebastian Bassi sbassi at gmail.com
Sun Jul 6 19:53:54 UTC 2008


NCBIStandalone changed in 1.46 due to bug #2508.
So this code that was working before, no longer works:

result, err = NCBIStandalone.blastall(b_exe, "blastn",
              b_db, f_name, expectation=1e-10, descriptions=1)

The error trace is:

File "/mnt/hda2/bio/biopython-1.46/build/lib.linux-i686-2.5/Bio/Blast/NCBIStandalone.py",
line 1986, in _security_check_parameters
    if ";" in value or "&&" in value :
TypeError: argument of type 'float' is not iterable

So I had to rewrite the code as:

result, err = NCBIStandalone.blastall(b_exe, "blastn",
              b_db, f_name, expectation="1e-10", descriptions="1")

The problem is the function "_security_check_parameters", that assumes
that all arguments are strings.

Proposed solutions:

1) Leave it as is (this is not a bug). Some tutorial should be changed (?)
2) Modify line 1986 from:
        if ";" in value or "&&" in value :
To this:
        if ";" in value or "&&" in str(value) :



More information about the Biopython-dev mailing list