Unsupported sound files format in tests
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 611
- Forks
- 211
- PR merge metrics
- No merged PRs in 30d
Description
Originally reported by: **Lumír Balhar (Bitbucket: [frenzymadness](https://bitbucket.org/frenzymadness), GitHub: [frenzymadness](https://github.com/frenzymadness))**
----------------------------------------
Hello.
When I try to run tests it fails because files in test/sounds seems to be in unsupported format.
```
======================================================================
ERROR: test_load_22k16bitpcm (test.test_sound_formats.SoundFormatsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/test_sound_formats.py", line 26, in test_load_22k16bitpcm
self.assert_loadable('wav22k16bitpcm')
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/test_sound_formats.py", line 15, in assert_loadable
s = sounds.load(name)
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/pgzero/loaders.py", line 135, in load
res = self.cache[key] = self._load(p, *args, **kwargs)
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/pgzero/loaders.py", line 189, in _load
""".format(path, fmt).strip()) from None
pgzero.loaders.UnsupportedFormat: '/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/sounds/wav22k16bitpcm.wav' is not in a supported audio format.
It appears to be:
WAV audio encoded as Microsoft PCM, 16 bit, mono, 22050 Hz
Pygame supports only uncompressed WAV files (PCM or ADPCM) and compressed
Ogg Vorbis files. Try re-encoding the sound file, for example using Audacity:
http://audacityteam.org/
======================================================================
ERROR: test_load_22k8bitpcm (test.test_sound_formats.SoundFormatsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/test_sound_formats.py", line 29, in test_load_22k8bitpcm
self.assert_loadable('wav22k8bitpcm')
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/test_sound_formats.py", line 15, in assert_loadable
s = sounds.load(name)
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/pgzero/loaders.py", line 135, in load
res = self.cache[key] = self._load(p, *args, **kwargs)
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/pgzero/loaders.py", line 189, in _load
""".format(path, fmt).strip()) from None
pgzero.loaders.UnsupportedFormat: '/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/sounds/wav22k8bitpcm.wav' is not in a supported audio format.
It appears to be:
WAV audio encoded as Microsoft PCM, 8 bit, mono, 22050 Hz
Pygame supports only uncompressed WAV files (PCM or ADPCM) and compressed
Ogg Vorbis files. Try re-encoding the sound file, for example using Audacity:
http://audacityteam.org/
======================================================================
ERROR: test_load_22kadpcm (test.test_sound_formats.SoundFormatsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/test_sound_formats.py", line 32, in test_load_22kadpcm
self.assert_loadable('wav22kadpcm')
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/test_sound_formats.py", line 15, in assert_loadable
s = sounds.load(name)
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/pgzero/loaders.py", line 135, in load
res = self.cache[key] = self._load(p, *args, **kwargs)
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/pgzero/loaders.py", line 189, in _load
""".format(path, fmt).strip()) from None
pgzero.loaders.UnsupportedFormat: '/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/sounds/wav22kadpcm.wav' is not in a supported audio format.
It appears to be:
WAV audio encoded as Microsoft ADPCM, mono, 22050 Hz
Pygame supports only uncompressed WAV files (PCM or ADPCM) and compressed
Ogg Vorbis files. Try re-encoding the sound file, for example using Audacity:
http://audacityteam.org/
======================================================================
ERROR: test_load_vorbis1 (test.test_sound_formats.SoundFormatsTest)
Load OGG Vorbis with .ogg extension.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/test_sound_formats.py", line 60, in test_load_vorbis1
self.assert_loadable('vorbis1')
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/test_sound_formats.py", line 15, in assert_loadable
s = sounds.load(name)
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/pgzero/loaders.py", line 135, in load
res = self.cache[key] = self._load(p, *args, **kwargs)
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/pgzero/loaders.py", line 189, in _load
""".format(path, fmt).strip()) from None
pgzero.loaders.UnsupportedFormat: '/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/sounds/vorbis1.ogg' is not in a supported audio format.
It appears to be:
Unknown format (not RIFF WAVE)
Pygame supports only uncompressed WAV files (PCM or ADPCM) and compressed
Ogg Vorbis files. Try re-encoding the sound file, for example using Audacity:
http://audacityteam.org/
======================================================================
ERROR: test_load_vorbis2 (test.test_sound_formats.SoundFormatsTest)
Load OGG Vorbis with .oga extension.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/test_sound_formats.py", line 64, in test_load_vorbis2
self.assert_loadable('vorbis2')
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/test_sound_formats.py", line 15, in assert_loadable
s = sounds.load(name)
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/pgzero/loaders.py", line 135, in load
res = self.cache[key] = self._load(p, *args, **kwargs)
File "/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/pgzero/loaders.py", line 189, in _load
""".format(path, fmt).strip()) from None
pgzero.loaders.UnsupportedFormat: '/builddir/build/BUILD/lordmauve-pgzero-de127c76f809/test/sounds/vorbis2.oga' is not in a supported audio format.
It appears to be:
Unknown format (not RIFF WAVE)
Pygame supports only uncompressed WAV files (PCM or ADPCM) and compressed
Ogg Vorbis files. Try re-encoding the sound file, for example using Audacity:
http://audacityteam.org/
----------------------------------------------------------------------
```
----------------------------------------
- Bitbucket: https://bitbucket.org/lordmauve/pgzero/issue/58
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with test/test_sound_formats.py and the failing fixtures in test/sounds, then run the sound-format tests to reproduce the errors. Re-encode or replace the affected WAV and Ogg files with supported formats, and confirm that all listed tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100