-2
I was doing Video Course exercises on Python and I stagnated on Challenge 21, whose goal is to make a program that touches an mp3 file. However, I have tried as shown in the video and it did not work, I have tried the ways I saw in the comments and it also did not work because they are either obsolete or in maintenance. I would like to know about any current code that effectively performs its function. I thank you from now on. :)
Just follow my codes I tried before:
Through the Pygame of the Year video (2017)
import pygame
pygame.mixer.init()
pygame.init()
pygame.mixer.music.load('McPoze.mp3')
pygame.music.play()
pygame.event.wait()
-Error: pygame.error: Couldn’t open 'Mcpoze.mp3'
For help of comments
import pygame
pygame.mixer.init()
pygame.mixer.music.load('McPoze.mp3')
pygame.mixer.music.play()
input()
pygame.event.wait()
-Error: pygame.error: Couldn’t open 'Mcpoze.mp3'
import playsound
playsound.playsound('McPoze.mp3')
-Error: Unicodedecodeerror: 'utf-8' codec can’t Decode byte 0xe3 in position 24: invalid continuation byte
import webbrowser
webbrowser.open('McPoze.mp3')
-Error: Opens a tab in Internet Explorer unrelated to mp3
Friend this happens because your Python is updated and the library is not. I recommend using Python3.6 to use the Pygame library.
– Gabriel Viticov