Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot start pushbutton.py on RPi Zero - PulseAudio server connection failure: Connection refused #676

Closed
Enzycal opened this issue Dec 4, 2018 · 1 comment

Comments

@Enzycal
Copy link

Enzycal commented Dec 4, 2018

Board and OS details:

Open a terminal and run

cat /proc/cpuinfo  
cat /etc/os-release  
processor	: 0
model name	: ARMv6-compatible processor rev 7 (v6l)
BogoMIPS	: 997.08
Features	: half thumb fastmult vfp edsp java tls 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xb76
CPU revision	: 7

Hardware	: BCM2835
Revision	: 9000c1
Serial		: 0000000060f0dfc4


PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Describe the bug:

The installation demo works but manually starting the assistant failes. After running pushbutton.py the CPU goes to 100% for 30 - 60 seconds before I hear it say "Hi" and then it returns errors.

vlcpulse audio output error: PulseAudio server connection failure: Connection refused
sounddevice.PortAudioError: Error opening RawStream: Device unavailable

Did you go through or search the issues section to check if your issue was already discussed (either currently open issues or closed issues).

Yes

2. Is the issue related to assistant installation ?

No

If answer to question 2 is Yes, then paste the contents of the terminal below.


If answer to question 2 is No, then proceed further.

3. Does the assistant service start normally?

No

4. Is the assistant service restarting automatically?

Yes/No - Not tested (would asume it is)

If answer to question 4 is Yes, then paste the contents of the terminal below.


If answer to question 4 is No, then proceed further.

Manually start the assistant. For guidelines to start the assistant manually refer this

Paste the command below, that crashed the assistant

/home/pi/env/bin/python -u /home/pi/GassistPi/src/pushbutton.py --project-id 'xxxxxxxxx-xxxxxxx'  --device-model-id 'xxxxxxxxx-xxxxxxx-xxxxxx-xxxxxx-xxxxxxxxx-xxxxxx'

Paste the contents of the terminal below

pi@raspberrypi:~ $ /home/pi/env/bin/python -u /home/pi/GassistPi/src/pushbutton.py --project-id 'xxxxxxxxx-xxxxxxx'  --device-model-id 'xxxxxxxxx-xxxxxxx-xxxxxx-xxxxxx-xxxxxxxxx-xxxxxx'
[01ac6eb0] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
[01afe228] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
USB-MIC-HDMI
Initializing GPIOs 5 and 6 for assistant activity indication
Traceback (most recent call last):
  File "/home/pi/GassistPi/src/pushbutton.py", line 918, in <module>
    main()
  File "/home/pi/env/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/env/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/pi/env/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/env/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/pi/GassistPi/src/pushbutton.py", line 772, in main
    flush_size=audio_flush_size
  File "/home/pi/env/lib/python3.5/site-packages/googlesamples/assistant/grpc/audio_helpers.py", line 190, in __init__
    blocksize=int(block_size/2),  # blocksize is in number of frames.
  File "/home/pi/env/lib/python3.5/site-packages/sounddevice.py", line 1264, in __init__
    **_remove_self(locals()))
  File "/home/pi/env/lib/python3.5/site-packages/sounddevice.py", line 780, in __init__
    'Error opening {0}'.format(self.__class__.__name__))
  File "/home/pi/env/lib/python3.5/site-packages/sounddevice.py", line 2572, in _check
    raise PortAudioError(errormsg, err)
sounddevice.PortAudioError: Error opening RawStream: Device unavailable [PaErrorCode -9985]
@shivasiddharth
Copy link
Owner

Upstream issue. Duplicate of #622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants