I copied this program from a previous reply on this site:
import pygame
pygame.mixer.init()
pygame.mixer.music.load('beep.wav')
pygame.mixer.music.play()
while pygame.mixer.music.get_busy()==True:
continue
The 'beep.wav. file is located in the python programs file
When I run it, I get the following:
Traceback (most recent call last):
File "/home/pi/programs/test pygame.py", line 3, in <module>
pygame.mixer.music.load('beep.wav')
pygame.error: Couldn't open 'beep.wav'
I would be grateful for advice about where I am going wrong. have I put the wav file in the wrong place?
Thanks