[Debian-med-packaging] Bug#751277: python-biopython: FTBFS on mips* powerpc s390x

Jakub Wilk jwilk at debian.org
Fri Jun 13 16:22:06 UTC 2014


* Peter Cock <p.j.a.cock at googlemail.com>, 2014-06-13, 14:57:
>Line 555-557,
>
>        clusterid, celldata = somcluster(data=data, mask=mask, weight=weight,
>                                         transpose=0, nxgrid=10, nygrid=10,
>                                         inittau=0.02, niter=100, dist='e')
>
>This all give the following error via C function distance_converter in 
>Bio/Cluster/clustermodule.c
>
>ValueError: distance should be a single character
>
>Yet in all those examples, dist='e' which is a single character...

I had a quick looks at the code:

  if (PyUnicode_Check(object))
      data = PyUnicode_AS_DATA(object);
  # ...
  if (strlen(data)!=1)
  { PyErr_Format(PyExc_ValueError, "method should be a single character (not '%s')", data);
    return 0;
  }

But PyUnicode_AS_DATA() returns a pointer to UTF-32 data. On big-endian 
architectures (such as powerpc or s390x), the first byte is always 0, so 
strlen() returns 0.

-- 
Jakub Wilk



More information about the Debian-med-packaging mailing list