[New-bugs-announce] [issue2245] aifc cannot handle unrecognised chunk type "CHAN"

Oki Mikito report at bugs.python.org
Thu Mar 6 17:52:24 CET 2008


New submission from Oki Mikito:

When aifc tries to open an AIFF audio file, it collects the file's chunk 
information. Apparently some AIFF files contain a chunk type string "CHAN", 
and the module just won't open the files...

Here's a captured error message:
------------
>>> import os
>>> os.getcwd()
'C:¥¥Documents and Settings¥¥loki'
>>> import aifc
>>> f=aifc.open('tr_04.aif','r')
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "C:¥Python25¥lib¥aifc.py", line 928, in open
    return Aifc_read(f)
  File "C:¥Python25¥lib¥aifc.py", line 341, in __init__
    self.initfp(f)
  File "C:¥Python25¥lib¥aifc.py", line 320, in initfp
    raise Error, 'unrecognized chunk type '+chunk.chunkname
Error: unrecognized chunk type CHAN
>>> 
------------

Solution: Add 'CHAN' in the list of _skiplist item, in lib/aifc.py, line 147

----------
components: Library (Lib)
messages: 63326
nosy: loki_dePlume
severity: normal
status: open
title: aifc cannot handle unrecognised chunk type "CHAN"
type: feature request
versions: Python 2.5

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2245>
__________________________________


More information about the New-bugs-announce mailing list