So im making a python game with python and I'm using mixer to play audio, but when I run the game this error shows
pygame 2.1.2 (SDL 2.0.16, Python 3.8.12)
Hello from the pygame community. https://www.pygame.org/contribute.html
music started playing....
Traceback (most recent call last):
File "main.py", line 22, in <module>
mixer.music.play('walk the dinosaur.mp3')
TypeError: an integer is required (got type str)"
this is my code
import pyflakes
import pygame
import os
from pygame import mixer
pygame.init()
loc = 1
input
wtd = 'walk the dinosaur.mp3'
mixer.init()
#Load audio file
mixer.music.load('walk the dinosaur.mp3')
print("music started playing....")
#Set preferred volume
mixer.music.set_volume(0.2)
#Play the music
mixer.music.play('walk the dinosaur.mp3')