pydub
pydub copied to clipboard
AudioSegment.from_mp3() raises FileNotFoundError
Steps to reproduce
Expected behavior
Tell us what should happen
song = pydub.AudioSegment.from_mp3(MP3file)
should return a 'pydub.audio_segment.AudioSegment object'
Actual behavior
Tell us what happens instead It raises "FileNotFoundError: [WinError 2] The system cannot find the file specified", although the 'MP3file' is verified to exist.
Your System configuration
- Python version: 3.7
- Pydub version: 0.25.1
- ffmpeg or avlib?: ffmpeg
- ffmpeg/avlib version: N-93230-gfc32e08941
Is there an audio file you can include to help us reproduce?
You can include the audio file in this issue - just put it in a zip file and drag/drop the zip file into the github issue. audio.zip
Hi, I have the same issue. Have you found any solution?
Same here.
Adding the the folder of the installed 'ffmpeg' S/W to the environment PATH (in Windows) solves the problem.
Which means that the FileNotFound error does not refer to the MP3 file but rather to some component of the 'ffmpeg' S/W (ffmpeg.exe or ffprobe.exe), which the developer thought unnecessary to name. Well, this is the result of slipshod programming: it produces unnecessary traffic annd trouble.
Hi, I have the same issue. Have you found any solution?
See the answer I just posted ...
Adding the the folder of the installed 'ffmpeg' S/W to the environment PATH (in Windows) solves the problem.
Which means that the FileNotFound error does not refer to the MP3 file but rather to some component of the 'ffmpeg' S/W (ffmpeg.exe or ffprobe.exe), which the developer thought unnecessary to name. Well, this is the result of slipshod programming: it produces unnecessary traffic annd trouble.
How to fix it in MacOS?
Thanks @fau1095. I have already indicated this solution about a month ago.
Thanks @fau1095. I have already indicated this solution about a month ago.
Your solution only includes Windows systems, what about Mac OS? Anyways I found a better option for this purpose so I'm not using pydub anymore
Adding the the folder of the installed 'ffmpeg' S/W to the environment PATH (in Windows) solves the problem.
Which means that the FileNotFound error does not refer to the MP3 file but rather to some component of the 'ffmpeg' S/W (ffmpeg.exe or ffprobe.exe), which the developer thought unnecessary to name. Well, this is the result of slipshod programming: it produces unnecessary traffic annd trouble.
Thank you @AlkisPis for the solution. It works for me in windows.
You're welcome, @mausam-office. Glad it worked for you too.