Code Monkey home page Code Monkey logo

Comments (5)

geerlingguy avatar geerlingguy commented on August 17, 2024

fade-it

from pi-bell-slapper.

geerlingguy avatar geerlingguy commented on August 17, 2024

For the sound, I'm getting the following on a Pi I'm testing on that doesn't actually have a sound device integrated:

==> error.log <==
Failed to create secure directory (/var/www/.config/pulse): No such file or directory
Failed to create secure directory (/var/www/.config/pulse): No such file or directory
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
Traceback (most recent call last):
  File "/home/pi/pi-bell-slapper/play_sound.py", line 32, in <module>
    play_the_sound()
  File "/home/pi/pi-bell-slapper/play_sound.py", line 23, in play_the_sound
    pygame.mixer.init()
pygame.error: No available audio device

I'm not sure if that first line is an error that would break anything or not (as I haven't tried this on the system that actually has the little USB sound card...), but it's something to keep in mind if it's not working. See https://unix.stackexchange.com/a/90025 for an example of a fix. I might just see about setting up pulseaudio settings for the Apache user, or system-wide.

from pi-bell-slapper.

geerlingguy avatar geerlingguy commented on August 17, 2024

Added the extra option and made everything supposedly work:

Screen Shot 2023-03-30 at 4 12 29 PM

from pi-bell-slapper.

geerlingguy avatar geerlingguy commented on August 17, 2024

In production, getting:

Home directory not accessible: Permission denied
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM default
Traceback (most recent call last):
  File "/home/pi/pi-bell-slapper/play_sound.py", line 32, in <module>
    play_the_sound()
  File "/home/pi/pi-bell-slapper/play_sound.py", line 23, in play_the_sound
    pygame.mixer.init()
pygame.error: ALSA: Couldn't open audio device: No such file or directory

from pi-bell-slapper.

geerlingguy avatar geerlingguy commented on August 17, 2024

After adding a /etc/asound.conf file with the same contents as the pi user's, it seems like the thing works!

Home directory not accessible: Permission denied
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred

Still get 'Home directory not accessible' but that's probably just ALSA mixer attempting to load any apache2 user overrides.

from pi-bell-slapper.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.