Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is problem in this python code? cannot specify extra characters after a string enclosed in quotation marks

I already did python pip install playsound and the location of my Python file is also correct please check what is the problem?

It shows cannot specify extra characters after a string enclosed in quotation marks.

My code is:

from playsound import playsound

playsound('C:\\Users\\Lenovo\\OneDrive\\Documents\\Zoom\\1. Chapter 1\\play.mp3\\play.mp3')

Error occured:

enter image description here

Location of sound:

enter image description here

like image 974
Arjun Ghimire Avatar asked Feb 03 '26 16:02

Arjun Ghimire


1 Answers

playsound version 1.3.0 has this problem , just downgrade to version 1.2.2 . it will work perfectly fine.

https://pypi.org/project/playsound/1.2.2/

like image 191
Himanshu sharma Avatar answered Feb 05 '26 06:02

Himanshu sharma