[Biopython-dev] Bio/SearchIO/BlastIO/blast_xml.py output under Python 2.7.4

Peter Cock p.j.a.cock at googlemail.com
Mon Apr 8 11:28:07 EDT 2013


Hi Bow,

I've just updated the 64bit Linux buildslave from Python 2.7.3 to
2.7.4 and there
is a new unicode failure with the BLAST XML writing code in SearchIO (below).

Can you reproduce this? Keep in mind this could be a new bug in Python itself ;)

Separately the are some BGZF issues, see also this thread:
http://lists.open-bio.org/pipermail/biopython/2013-April/008490.html

Thanks,

Peter

======================================================================
ERROR: test_write_multiple_from_blastxml
(test_SearchIO_write.BlastXmlWriteCases)
Test blast-xml writing from blast-xml, BLAST 2.2.26+, multiple queries
(xml_2226_blastp_001.xml)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_SearchIO_write.py", line 55, in test_write_multiple_from_blastxml
    self.parse_write_and_compare(source, self.fmt, self.out, self.fmt)
  File "test_SearchIO_write.py", line 27, in parse_write_and_compare
    SearchIO.write(source_qresults, out_file, out_format, **kwargs)
  File "/home_local/buildslave/repositories/biopython/build/lib.linux-x86_64-2.7/Bio/SearchIO/__init__.py",
line 610, in write
    writer.write_file(qresults)
  File "/home_local/buildslave/repositories/biopython/build/lib.linux-x86_64-2.7/Bio/SearchIO/BlastIO/blast_xml.py",
line 695, in write_file
    xml.startDocument()
  File "/home_local/buildslave/repositories/biopython/build/lib.linux-x86_64-2.7/Bio/SearchIO/BlastIO/blast_xml.py",
line 612, in startDocument
    self.write('<?xml version="1.0"?>\n'
  File "/home_local/buildslave/lib/python2.7/xml/sax/saxutils.py",
line 103, in write
    super(UnbufferedTextIOWrapper, self).write(s)
TypeError: must be unicode, not str

======================================================================
ERROR: test_write_single_from_blastxml (test_SearchIO_write.BlastXmlWriteCases)
Test blast-xml writing from blast-xml, BLAST 2.2.26+, single query
(xml_2226_blastp_004.xml)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_SearchIO_write.py", line 49, in test_write_single_from_blastxml
    self.parse_write_and_compare(source, self.fmt, self.out, self.fmt)
  File "test_SearchIO_write.py", line 27, in parse_write_and_compare
    SearchIO.write(source_qresults, out_file, out_format, **kwargs)
  File "/home_local/buildslave/repositories/biopython/build/lib.linux-x86_64-2.7/Bio/SearchIO/__init__.py",
line 610, in write
    writer.write_file(qresults)
  File "/home_local/buildslave/repositories/biopython/build/lib.linux-x86_64-2.7/Bio/SearchIO/BlastIO/blast_xml.py",
line 695, in write_file
    xml.startDocument()
  File "/home_local/buildslave/repositories/biopython/build/lib.linux-x86_64-2.7/Bio/SearchIO/BlastIO/blast_xml.py",
line 612, in startDocument
    self.write('<?xml version="1.0"?>\n'
  File "/home_local/buildslave/lib/python2.7/xml/sax/saxutils.py",
line 103, in write
    super(UnbufferedTextIOWrapper, self).write(s)
TypeError: must be unicode, not str


More information about the Biopython-dev mailing list