1

When I try to start pygame.mixer it results in:

import pygame

pygame.init()
pygame.mixer.init()
sounda= pygame.mixer.Sound("scream.ogg")

sounda.play()

No protocol specified No protocol specified No protocol specified xcb_connection_has_error() returned True

What to do? It always worked on other raspberrys. I allready checked the audio configuration and ran some other code..

  • Your exact code works for me with a known-good `.ogg` file. Does you file play OK otherwise? What OS Python & Pygame versions are you using? – Kingsley Feb 05 '20 at 21:25
  • Does the user running the code have sound-output permissions? Are you using bluetooth audio? Do you need `jackd` running? This seems like a rPi issue rather than a PyGame issue. You might have better luck asking on https://raspberrypi.stackexchange.com – Kingsley Feb 05 '20 at 21:52
  • 1
    Allright, the thing was, i had the code running on a RPi 2 and it worked, The RPi 2 was damaged somehow. When i changed the SD Card to the RPi3 that error came. I reinstalled the whole System then it worked. All other codes ran correct. – Kleingeistkleister Jun 16 '20 at 19:22

0 Answers0