0

WaveFile error with PYOA
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

WaveFile error with PYOA

by atrejub on Sun Jan 10, 2021 11:43 pm

Hello everybody!

I just got a PyGamer a couple of weeks ago, and today was trying to get the PYOA demo (with cursor support) working, with hopes of making a larger hypercard like project. It threw an error, however, when it reached a card with sound attached to it:

Playing sound /cave/pub.wav
Traceback (most recent call last):
File "code.py", line 26, in <module>
File "adafruit_pyoa.py", line 320, in display_card
File "adafruit_pyoa.py", line 259, in _play_sound_for
File "adafruit_pyoa.py", line 366, in play_sound
AttributeError: 'module' object has no attribute 'WaveFile'

Looking at the CircuitPython 6.0.1 release notes, I'm guessing the error is being caused by a call to audioio for WaveFile? ("Removed Mixer, RawSample, and WaveFile from audioio. They are now only available in audiocore. 5.x has them in both modules.")

Is there an easy way for me to fix this (I've not dealt with .mpy files yet), any plans for an update to adafruit_pyoa, or should I downgrade to an older version of CircuitPython ?

atrejub
 
Posts: 1
Joined: Wed Nov 11, 2020 12:31 am

Re: WaveFile error with PYOA

by tannewt on Mon Jan 11, 2021 7:08 pm

For every mpy file there is a source py file. You can find the one for PYOA here: https://github.com/adafruit/Adafruit_Ci ... it_pyoa.py

I'll file an issue to have it updated.

tannewt
 
Posts: 2034
Joined: Thu Oct 06, 2016 8:48 pm

Please be positive and constructive with your questions and comments.