I’m trying to use playsound to play a file within the folder of my code, however every time I run my code it seems it is able to call the file however I always receive this output:
playsound.PlaysoundException:
Error 277 for command:
open "para.mp3" alias playsound_0.9208788744295284
A problem occurred in initializing MCI.
The code that is run is just the use of the playsound function:
from playsound import playsound
playsound("01. Humongous.mp3")
I’m unsure if this is just an issue with my machine or something that I’m missing?
Tomerikoo
18.1k16 gold badges45 silver badges60 bronze badges
asked Jun 17, 2019 at 8:53
1
Convert the mp3 file to wav. Worked for me.
answered May 19, 2020 at 14:22
2
Managed to fix it. After hours of ripping my hair out I eventually tried a different file to play and it worked. Not actually sure if there is a bitrate limit with the playsound library but it certainly didn’t like that particular file. Tried another file with a lower bitrate and it worked fine.
answered Sep 4, 2019 at 11:25
Daniel SilverDaniel Silver
411 gold badge1 silver badge3 bronze badges
I also faced the same issue it is not with the bit rate of the file, it seems to be the tags in the music file like «track title, cover art, album name, encoding» and so on is causing it so I would like to recommend you to remove these tags and leave it as such, to do this editing I used mp3tag application you can get it from here. This worked for me. You can check instructables to know how to use this application to edit tags.
If you want those tags you can type it out and check if again the problem arises if it does then don’t add the tags.
answered May 5, 2020 at 8:44
Kamalesh PathyKamalesh Pathy
621 gold badge1 silver badge6 bronze badges
Try removing the period from the filename you’re playing and try again. I don’t know what system you’re running this on, but it might be interfering with the file reading process.
answered Jun 20, 2019 at 17:56
Ethan HillEthan Hill
4582 gold badges9 silver badges24 bronze badges
In playsound,for (.mp3)
you can’t directly upload the customized mp3 file because of some issue in bit initailizaing.
To solve this issue,
We need to change our .mp3 file to .mp3 format again on some audio converter application or online converter. Now converted mp3 file can be flawlessly accessed for playsound.playsound(dir/users/converted/song.mp3).Enjoy it..
answered Jan 22, 2021 at 6:41
0 / 0 / 0 Регистрация: 09.10.2021 Сообщений: 1 |
|
1 |
|
09.10.2021, 23:08. Показов 8396. Ответов 2
Пытался научиться воспроизводить звук, но не могу избавиться от этой ошибки. Другую музыку скачивал, название менял, другие модули скачивал
0 |
306 / 187 / 97 Регистрация: 01.05.2014 Сообщений: 519 |
|
11.10.2021, 11:49 |
2 |
Дело не в музыке, а в самом модуле. Нужна версия 1.2.2. Код pip uninstall playsound pip install playsound==1.2.2
1 |
0 / 0 / 0 Регистрация: 07.12.2012 Сообщений: 93 |
|
03.07.2022, 19:21 |
3 |
Спасибо мне помогло!
0 |
I’m trying to use playsound to play a file within the folder of my code, however every time I run my code it seems it is able to call the file however I always receive this output:
playsound.PlaysoundException:
Error 277 for command:
open "para.mp3" alias playsound_0.9208788744295284
A problem occurred in initializing MCI.
The code that is run is just the use of the playsound function:
from playsound import playsound
playsound("01. Humongous.mp3")
I’m unsure if this is just an issue with my machine or something that I’m missing?
Tomerikoo
17.6k16 gold badges40 silver badges58 bronze badges
asked Jun 17, 2019 at 8:53
1
Convert the mp3 file to wav. Worked for me.
answered May 19, 2020 at 14:22
1
Managed to fix it. After hours of ripping my hair out I eventually tried a different file to play and it worked. Not actually sure if there is a bitrate limit with the playsound library but it certainly didn’t like that particular file. Tried another file with a lower bitrate and it worked fine.
answered Sep 4, 2019 at 11:25
Daniel SilverDaniel Silver
411 gold badge1 silver badge3 bronze badges
I also faced the same issue it is not with the bit rate of the file, it seems to be the tags in the music file like «track title, cover art, album name, encoding» and so on is causing it so I would like to recommend you to remove these tags and leave it as such, to do this editing I used mp3tag application you can get it from here. This worked for me. You can check instructables to know how to use this application to edit tags.
If you want those tags you can type it out and check if again the problem arises if it does then don’t add the tags.
answered May 5, 2020 at 8:44
Kamalesh PathyKamalesh Pathy
621 gold badge1 silver badge6 bronze badges
Try removing the period from the filename you’re playing and try again. I don’t know what system you’re running this on, but it might be interfering with the file reading process.
answered Jun 20, 2019 at 17:56
Ethan HillEthan Hill
4682 gold badges9 silver badges24 bronze badges
In playsound,for (.mp3)
you can’t directly upload the customized mp3 file because of some issue in bit initailizaing.
To solve this issue,
We need to change our .mp3 file to .mp3 format again on some audio converter application or online converter. Now converted mp3 file can be flawlessly accessed for playsound.playsound(dir/users/converted/song.mp3).Enjoy it..
answered Jan 22, 2021 at 6:41
Я постоянно получаю error 277 : a problem occurred in initializing MCI.
при использовании модуля playsound
. Я просто сделал это:
from playsound import playsound
playsound('what.mp3')
what.mp3
генерируется с использованием gtts
.
5 ответов
Вы должны написать так:
from playsound import playsound
playsound('C:UsersTalha Shafiq ChadhryDownloadsVideo')
-1
JLeno46
15 Ноя 2020 в 02:40
Раньше я получал эту ошибку, теперь решил … Попробуйте эту
import playsound
playsound.playsound("D:Yalgaar.mp3")
Здесь Ялгаар сохранен на моем диске D
-1
Atharva Chauhan
31 Янв 2021 в 18:55
Я просто решил ту же проблему с помощью воспроизведения, выполнив 2 шага:
-
Я перекодировал .mp3 с помощью Audacity, потому что файлы, которые я скачал с веб-конвертера, были мусорными. (все еще не работает)
-
Я добавил значение True в конце, вот так:
from playsound import playsound playsound('/path/to/a/sound/file/you/want/to/play.mp3, True')
Тогда это сработало. Надеюсь, это поможет.
0
rambopython
22 Авг 2021 в 01:35
Я знаю, что это слишком поздно, но попробуйте установить Klite Codec Pack и попробуйте еще раз, у меня сработало
2
Teddie Bui
20 Мар 2021 в 07:29
Попробуйте использовать этот тестовый код, чтобы увидеть, работает ли он:
from playsound import playsound
playsound('/path/to/a/sound/file/you/want/to/play.mp3')
Если он не установится снова или попробуйте другую версию python.
-1
1010011010
23 Ноя 2019 в 16:54
0 / 0 / 0 Регистрация: 09.10.2021 Сообщений: 1 |
|
1 |
|
09.10.2021, 23:08. Показов 6013. Ответов 2
Пытался научиться воспроизводить звук, но не могу избавиться от этой ошибки. Другую музыку скачивал, название менял, другие модули скачивал
__________________ 0 |
299 / 181 / 95 Регистрация: 01.05.2014 Сообщений: 501 |
|
11.10.2021, 11:49 |
2 |
Дело не в музыке, а в самом модуле. Нужна версия 1.2.2. Код pip uninstall playsound pip install playsound==1.2.2 1 |
0 / 0 / 0 Регистрация: 07.12.2012 Сообщений: 92 |
|
03.07.2022, 19:21 |
3 |
Спасибо мне помогло! 0 |
Error 277 for command:
A problem occurred in initializing MCI. error shown in terminal when i run playsound …help me
python 3.10.4
vs code
??
What I have tried:
i have uninstall and re install vscode and python but dint work
Comments
from playsound import playsound
playsound(‘E:HANDOUTS1. Chapter 1play.mp3’)
Sorry, I have no access to your drive ‘E:’ and also an mp3 file is not source code
i cant get it
help me in this what mistake i do
So what did you find when you Goggled for «initializing mci error 277»?
Bullshit. Everything I read comes down to a problem with the tags in the file you’re trying to play.
So what will b the solution
You didn’t read a single one of the results from Google, did you?
i have read and tried every thing even i reset my laptop
No, you haven’t, because the problem seems to be with the metadata tags in the file you’re trying to play.
There is nothing in your code that can fix that, nor is there a problem with the O/S, or your hardware.
This is a problem with the file you’re trying to play! So get a different file from a different source and try to play that one.
i tried that also
didnt work for me
The specified device is not open or is not recognized by MCI.
So are you saying that the error message has changed after trying to play a different file?
You’re typing as little as possible and that makes it impossible to help you.
What does your code look like?
Error 277 for command:
A problem occurred in initializing MCI. error shown in terminal when i run playsound …help me
python 3.10.4
vs code
??
What I have tried:
i have uninstall and re install vscode and python but dint work
Comments
from playsound import playsound
playsound(‘E:HANDOUTS1. Chapter 1play.mp3’)
Sorry, I have no access to your drive ‘E:’ and also an mp3 file is not source code
i cant get it
help me in this what mistake i do
So what did you find when you Goggled for «initializing mci error 277»?
Bullshit. Everything I read comes down to a problem with the tags in the file you’re trying to play.
So what will b the solution
You didn’t read a single one of the results from Google, did you?
i have read and tried every thing even i reset my laptop
No, you haven’t, because the problem seems to be with the metadata tags in the file you’re trying to play.
There is nothing in your code that can fix that, nor is there a problem with the O/S, or your hardware.
This is a problem with the file you’re trying to play! So get a different file from a different source and try to play that one.
i tried that also
didnt work for me
The specified device is not open or is not recognized by MCI.
So are you saying that the error message has changed after trying to play a different file?
You’re typing as little as possible and that makes it impossible to help you.
What does your code look like?
Форум программистов Vingrad
Модераторы: Snowy, Alexeis, MetalFan |
Поиск: |
|
play mp3 277:Ошибка при инициализации MCI. |
Опции темы |
Чучмек | |||
НЭТ БИЛЭТ Профиль
Репутация: 2 |
При попытке воспроизвести некоторые mp3 файлы получаю ошибку $115 -«Ошибка при инициализации MCI».
——————— умную мысль держи при себе, а дурной — поделись с другими |
||
Чучмек | |
НЭТ БИЛЭТ Профиль
Репутация: 2 |
ЛЮДИ !!!!!! ——————— умную мысль держи при себе, а дурной — поделись с другими |
nick42 | |||
Новичок Профиль Репутация: нет |
Да лёгко!!
|
||
Чучмек | |
НЭТ БИЛЭТ Профиль
Репутация: 2 |
Теже яйца только в профиль. Это сообщение отредактировал(а) Чучмек — 10.10.2011, 19:55 Присоединённый файл ( Кол-во скачиваний: 4 ) ——————— умную мысль держи при себе, а дурной — поделись с другими |
nick42 | |
Новичок Профиль Репутация: нет |
Да, чего-то не то у этого файла именно в конце. Может «странноватый» редактор тэга применяли. Я музредактором mp3DirectCut нормальную часть отделил — и вместо 270 только 180 кб осталось. Это сообщение отредактировал(а) nick42 — 11.10.2011, 08:59 |
Чучмек | |
НЭТ БИЛЭТ Профиль
Репутация: 2 |
К сожалению рассчитывать на единичный случай не приходится. Соответственно нельзя такие файлы игнорировать,особенно в программе «для других». ——————— умную мысль держи при себе, а дурной — поделись с другими |
Чучмек | |
НЭТ БИЛЭТ Профиль
Репутация: 2 |
Подозрение падает на ID3v2.4 ——————— умную мысль держи при себе, а дурной — поделись с другими |
Правила форума «Delphi: Звук, графика и видео» | |
|
Запрещено: 1. Публиковать ссылки на вскрытые компоненты 2. Обсуждать взлом компонентов и делится вскрытыми компонентами
FAQ раздела лежит здесь! Если Вам помогли и атмосфера форума Вам понравилась, то заходите к нам чаще! С уважением, Girder, Snowy. |
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) |
0 Пользователей: |
« Предыдущая тема | Delphi: Звук, графика и видео | Следующая тема » |
I keep getting error 277 : a problem occurred in initializing MCI.
when using playsound
module. I basically just did this:
from playsound import playsound
playsound('what.mp3')
the what.mp3
is generated using gtts
.
Tomerikoo
18.1k16 gold badges45 silver badges60 bronze badges
asked Nov 23, 2019 at 13:17
1
I know this is too late but try to install Klite Codec Pack and try again, worked for me
answered Mar 20, 2021 at 4:29
I just solved the same issue using playsound by doing 2 steps:
-
I re-encoded the .mp3 with Audacity because the files that i downloaded from a webconverter was trashy.
(still not working) -
I added the True value at the end, like this:
from playsound import playsound playsound('/path/to/a/sound/file/you/want/to/play.mp3, True')
Then it worked.
I hope it’s helpful.
answered Aug 21, 2021 at 22:35
You can try this approach
from playsound import playsound
playsound('C:\Users\shubham sinha\Desktop\code\01RitvizLiggiOfficialMusicVideoRingtone.mp3')
answered Dec 10, 2022 at 15:27
1
Try using this test code to see if it works:
from playsound import playsound
playsound('/path/to/a/sound/file/you/want/to/play.mp3')
If it doesn’t install it again or try another version of python.
answered Nov 23, 2019 at 13:54
10100110101010011010
451 gold badge1 silver badge12 bronze badges
2
you should write like this:
from playsound import playsound
playsound('C:\Users\Talha Shafiq Chadhry\Downloads\Video')
JLeno46
1,1621 gold badge14 silver badges29 bronze badges
answered Nov 14, 2020 at 18:45
I used to get this error, Now solved…
Try this one
import playsound
playsound.playsound("D:\Yalgaar.mp3")
Here Yalgaar is saved in my D drive
answered Jan 31, 2021 at 15:55
Я постоянно получаю error 277 : a problem occurred in initializing MCI.
при использовании модуля playsound
. Я просто сделал это:
from playsound import playsound
playsound('what.mp3')
what.mp3
генерируется с использованием gtts
.
5 ответов
Вы должны написать так:
from playsound import playsound
playsound('C:\Users\Talha Shafiq Chadhry\Downloads\Video')
-1
JLeno46
15 Ноя 2020 в 02:40
Раньше я получал эту ошибку, теперь решил … Попробуйте эту
import playsound
playsound.playsound("D:\Yalgaar.mp3")
Здесь Ялгаар сохранен на моем диске D
-1
Atharva Chauhan
31 Янв 2021 в 18:55
Я просто решил ту же проблему с помощью воспроизведения, выполнив 2 шага:
-
Я перекодировал .mp3 с помощью Audacity, потому что файлы, которые я скачал с веб-конвертера, были мусорными. (все еще не работает)
-
Я добавил значение True в конце, вот так:
from playsound import playsound playsound('/path/to/a/sound/file/you/want/to/play.mp3, True')
Тогда это сработало. Надеюсь, это поможет.
0
rambopython
22 Авг 2021 в 01:35
Я знаю, что это слишком поздно, но попробуйте установить Klite Codec Pack и попробуйте еще раз, у меня сработало
2
Teddie Bui
20 Мар 2021 в 07:29
Попробуйте использовать этот тестовый код, чтобы увидеть, работает ли он:
from playsound import playsound
playsound('/path/to/a/sound/file/you/want/to/play.mp3')
Если он не установится снова или попробуйте другую версию python.
-1
1010011010
23 Ноя 2019 в 16:54