[Biopython-dev] NCBIStandalon not compatible with previous versions, is this a bug?
Peter
biopython at maubp.freeserve.co.uk
Mon Jul 7 13:07:24 UTC 2008
On Sun, Jul 6, 2008 at 8:53 PM, Sebastian Bassi <sbassi at gmail.com> wrote:
> 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) :
I would say its a bug, and casting into a string on line 1986 looks
like the best fix. I won't be able to do this until tomorrow
afternoon at the latest - if you could file a bug that would be
helpful in case I forget ;)
Thanks
Peter
More information about the Biopython-dev
mailing list