[Biopython-dev] Compiling Biopython on 64 bit Windows, was: Volunteer buildslave machines?

Peter Cock p.j.a.cock at googlemail.com
Tue Apr 22 09:57:23 UTC 2014


Hi Manlio,

There are several issues here -

On Mon, Apr 21, 2014 at 10:51 PM, Manlio Calvi <manlio.calvi at gmail.com> wrote:
> OK test on WinPython concluded. Analyzing it we have, the  expected
> TogoWS problem,

(which the TogoWS team will be fixing shortly)

> a skipped test for a non-compiled C module, two tests really but
> dependant from the same uncompiled module (
> ###################################
> test_KDTree ... skipping. C module in Bio.KDTree not compiled
> ###################################

(plus the other C code modules not getting compiled/installed,
which is a concern)

> and this errors:
>
> ======================================================================
> ERROR: test_unicode_exception (test_Phylo.IOTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File ".\test_Phylo.py", line 57, in test_unicode_exception
>     tree = Phylo.read(EX_NEWICK_BOM, 'newick')
>   File "C:\Users\CasuallyChaotic\Desktop\3.3 - Biopython
> test\WinPython-64bit-3.3.3.3\python-3.3.3.amd64\biopython\Bio\Phylo\_io.py",
> line 65, in read
>     tree = next(tree_gen)
>   File "C:\Users\CasuallyChaotic\Desktop\3.3 - Biopython
> test\WinPython-64bit-3.3.3.3\python-3.3.3.amd64\biopython\Bio\Phylo\_io.py",
> line 53, in parse
>     for tree in getattr(supported_formats[format], 'parse')(fp, **kwargs):
>   File "C:\Users\CasuallyChaotic\Desktop\3.3 - Biopython
> test\WinPython-64bit-3.3.3.3\python-3.3.3.amd64\biopython\Bio\Phylo\NewickIO.py",
> line 107, in parse
>     for line in self.handle:
>   File "C:\Users\CasuallyChaotic\Desktop\3.3 - Biopython
> test\WinPython-64bit-3.3.3.3\python-3.3.3.amd64\lib\encodings\cp1252.py",
> line 23, in decode
>     return codecs.charmap_decode(input,self.errors,decoding_table)[0]
> UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position
> 15: character maps to <undefined>
>

As you suggested below, the test_unicode_exception failure
from test_Phylo.py is from a recent commit, and likely has to
do with subtle Windows unicode differences:
https://github.com/biopython/biopython/commit/94d1e54b80df9e0fbdd3b56b30e40b860e48f26f

The 'good news' is this also broke under 32 bit Windows XP,
http://testing.open-bio.org/biopython/builders/Windows%20XP%20-%20Python%203.3/builds/557/steps/shell/logs/stdio

I have filed a bug:
https://github.com/biopython/biopython/issues/311

> ======================================================================
> ERROR: test_write_0 (test_Phylo_CDAO.WriterTests)
> Write and re-parse the phylogenies in test.cdao.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File ".\test_Phylo_CDAO.py", line 62, in test_write
>     CDAOIO.write([t1], outfile)
>   File "C:\Users\CasuallyChaotic\Desktop\3.3 - Biopython
> test\WinPython-64bit-3.3.3.3\python-3.3.3.amd64\biopython\Bio\Phylo\CDAOIO.py",
> line 74, in write
>     return Writer(trees).write(handle, plain=plain, **kwargs)
>   File "C:\Users\CasuallyChaotic\Desktop\3.3 - Biopython
> test\WinPython-64bit-3.3.3.3\python-3.3.3.amd64\biopython\Bio\Phylo\CDAOIO.py",
> line 268, in write
>     handle.write('@prefix %s: <%s> .\n' % (k, v))
> TypeError: 'str' does not support the buffer interface
>

That looks like a string versus bytes issue with the handle
(text versus binary mode), but I don't recall any changes
in that code... maybe a question for Eric?

> #################################################
>
>
> The test output for CDAO reports a series of slightly messages (more
> than an hundred) that looks like this:
> file://C:\WinPython3.3\3.3 - Biopython
> test\WinPython-64bit-3.3.3.3\python-3.3.3.amd64\biopython\Tests\CDAO\test.cdao/tree0000001#node0000001
> does not look like a valid URI, trying to serialize this will break.

My hunch is this warning could be due to the mixed slashes
(forward and back) which is typically fine with the windows
API for filenames, but evidently is confusing the CDAO
code - a question for Ben?

Thanks,

Peter



More information about the Biopython-dev mailing list