[Scipy-tickets] [SciPy] #744: Bug in scipy.io.wavfile on PPC architecture

SciPy scipy-tickets@scipy....
Wed Oct 1 14:22:20 CDT 2008


#744: Bug in scipy.io.wavfile on PPC architecture
----------------------+-----------------------------------------------------
 Reporter:  ilan      |       Owner:  somebody   
     Type:  defect    |      Status:  new        
 Priority:  normal    |   Milestone:  Unscheduled
Component:  scipy.io  |     Version:  devel      
 Severity:  normal    |    Keywords:  wavfile ppc
----------------------+-----------------------------------------------------
 When I read a wav file using:
 {{{
 >>> from scipy.io.wavfile import read
 >>> rate, data = read('scale.wav')
 Reading fmt chunk
 Warning:  unfamiliar format bytes...
 Warning:  %s chunk not understood
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File
 "/Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5
 /site-
 packages/scipy-0.6.0.0006-py2.5-macosx-10.3-fat.egg/scipy/io/wavfile.py",
 line 67, in read
     size = struct.unpack('I',fid.read(4))[0]
   File
 "/Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5/struct.py",
 line 87, in unpack
     return o.unpack(s)
 struct.error: unpack requires a string argument of length 4
 }}}
 the same wav file reads OK on other architectures.
 The file scipy/io/wavfile.py contains calls to {{{struct.unpack()}}}
 without specifying the endianness of the data.  My assumtion is that some
 {{{<}}} or {{{>}}} characters at the beginning
 of the format string should solve the problem.

-- 
Ticket URL: <http://scipy.org/scipy/scipy/ticket/744>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list