Python Forum
Error: audioio has no attribute 'AudioOut'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error: audioio has no attribute 'AudioOut'
#1
Having issues with audioio within CircuitPython giving the error 'audioio' has no attribute 'AudioOut'
AudioOut is used to set the audio interface for the files played on the Pi; in this case targeted to the standard headphone jack.

Details:
Pi3 B Using CircuitPython for Adafruit Trellis as sound board trigger
Validated and Reinstalled audioio using pip3
All packages were installed via pip3 as Python3 is intended environment
All packages are listed in pip and pip3
Tried running the script using sudo and non-sudo with python and python3

Example of a script that will throw the error:

import board
import time
import busio
import audioio
import audiocore
import adafruit_trellis

#Create I2C object
i2c_bus =  busio.I2C(SCL, SDA)

#Create Trellis Object
trellis = Trellis(i2c_bus)

#Set Audio to play from board
myaudio = audioio.AudioOut(board.A0)
I thought maybe being a novice is the issue but at this point I have exhausted what resources I can.
Any help would be appreciated. Not finding any reference to audioio having this issue.
Resolutions I've tried of similar "no attribute" issues do not resolve my issue.
Reply
#2
looking at the documentation (for audioio), I don't see any AudioOut reference.
netwrok likes this post
Reply
#3
I think you found the problem Larz60+. There is a CircuitPython audioio

https://docs.circuitpython.org/en/8.2.x/...index.html

And a regular python audioio

If you are running CircuitPython you would not be using python3 or pip3.
netwrok likes this post
Reply
#4
(Oct-22-2023, 10:49 AM)deanhystad Wrote: I think you found the problem Larz60+. There is a CircuitPython audioio

https://docs.circuitpython.org/en/8.2.x/...index.html

And a regular python audioio

If you are running CircuitPython you would not be using python3 or pip3.

I didn't realize that CircuitPython wasn't just a Python library but fully independent, so I just jumped in assuming that it was compatible since Python3 is a req.
Looks like there are a specific list of file names to use with CircuitPython, kinda lame if I intend to make anything complex.
Thanks for the help, I was loosing my mind lol.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  cx_oracle Error - AttributeError: 'function' object has no attribute 'cursor' birajdarmm 1 2,399 Apr-15-2023, 05:17 PM
Last Post: deanhystad
  Getting 'NoneType' object has no attribute 'find' error when WebScraping with BS Franky77 2 5,286 Aug-17-2021, 05:24 PM
Last Post: Franky77
  Attribute Error received not understood (Please Help) crocolicious 5 2,701 Jun-19-2021, 08:45 PM
Last Post: crocolicious
  error in scapy attribute 'haslayer' evilcode1 5 6,559 Mar-02-2021, 11:19 AM
Last Post: evilcode1
  attribute error instead of correct output MaartenRo 2 2,202 Aug-28-2020, 10:22 AM
Last Post: Larz60+
  attribute error stumped on how to fix it. hank4eva 7 4,787 Aug-11-2020, 04:47 AM
Last Post: hank4eva
  Attribute Error - trying to create a pixel array out of PNG files The_Sarco 1 2,019 Apr-29-2020, 07:10 PM
Last Post: deanhystad
  Attribute Error for Rename / Replace warden89 6 7,910 Jan-07-2020, 06:08 PM
Last Post: warden89
  Reading DBF files from Amazon s3 throwing error - 'int' object has no attribute 'isa abeesm 1 2,930 Sep-22-2019, 05:49 PM
Last Post: ndc85430
  Attribute Error Adit99 5 3,678 Aug-18-2019, 11:44 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020