[Biopython] Installation Help

Peter Cock p.j.a.cock at googlemail.com
Tue May 14 18:11:45 UTC 2013


On Tue, May 14, 2013 at 3:10 PM, Peter Cock <p.j.a.cock at googlemail.com> wrote:
> On Tue, May 14, 2013 at 1:38 AM, Tomlin, Joshua James wrote:
>>
>> ======================================================================
>> ERROR: test_fastq-sanger_Quality_example_fastq_bgz_get_raw (test_SeqIO_index.IndexDictTests)
>> Index fastq-sanger file Quality/example.fastq.bgz get_raw
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File "test_SeqIO_index.py", line 432, in <lambda>
>>     f = lambda x : x.get_raw_check(fn, fmt, alpha, c)
>>   File "test_SeqIO_index.py", line 272, in get_raw_check
>>     raw_file = h.read()
>>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py", line 253, in read
>>     while self._read(readsize):
>>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py", line 293, in _read
>>     self._read_gzip_header()
>>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py", line 205, in _read_gzip_header
>>     self._read_exact(struct.unpack("<H", self._read_exact(2)))
>>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py", line 185, in _read_exact
>>     data = self.fileobj.read(n)
>> TypeError: an integer is required
>
> This is a bug in Python 2.7.4, which broke GZIP support.
> You can downgrade to Python 2.7.3, wait for 2.7.5, apply
> the one line fix by hand: http://bugs.python.org/issue17666 or
> ignore this if you do not plan to use BGZF compressed files.
>
> (This explains most of the failures)

I've modified the unit tests to skip test_bgzf.py and the
Bio.bgzf doctests if run on Python with this broken gzip:
https://github.com/biopython/biopython/commit/975f5c4f6422951ff2ac54bed6928312fdcd1a51
https://github.com/biopython/biopython/commit/975f5c4f6422951ff2ac54bed6928312fdcd1a51

The user will now see this in the full test output:
test_bgzf ... skipping. Your Python has a broken gzip library, see
http://bugs.python.org/issue17666 for details

Peter



More information about the Biopython mailing list