FileNotFoundError: [WinError 2] The system cannot find the file specified. Error occurs again & again

Hello Everyone , I am trying to plot an spectrum of an mp3 audio file using python compiler .
But again & again I am facing this error , How can I fix it , I have checked the path & file type 100 times but still sowing the same error .
please guys help me , to sort it out.

The full Error was :

File D:\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)

File e:\python\video steganography\paper (audio)\second attempt.py:47
plot_frft_spectrogram(mp3_file, a=0.5)

File e:\python\video steganography\paper (audio)\second attempt.py:28 in plot_frft_spectrogram
samples, sample_rate = load_audio_mp3(file_path)

File e:\python\video steganography\paper (audio)\second attempt.py:16 in load_audio_mp3
audio = AudioSegment.from_mp3(file_path)

File D:\anaconda3\Lib\site-packages\pydub\audio_segment.py:796 in from_mp3
return cls.from_file(file, ‘mp3’, parameters=parameters)

File D:\anaconda3\Lib\site-packages\pydub\audio_segment.py:728 in from_file
info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)

File D:\anaconda3\Lib\site-packages\pydub\utils.py:274 in mediainfo_json
res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)

File D:\anaconda3\Lib\site-packages\spyder_kernels\customize\spydercustomize.py:109 in init
super(SubprocessPopen, self).init(*args, **kwargs)

File D:\anaconda3\Lib\subprocess.py:1024 in init
self._execute_child(args, executable, preexec_fn, close_fds,

File D:\anaconda3\Lib\subprocess.py:1509 in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,

FileNotFoundError: [WinError 2] The system cannot find the file specified

You use the pydub library which requires FFmpeg. Do you have FFmpeg installed? The file that can not be found is probably FFmpeg.exe

1 Like

Can you post your code (including the line of code in your program) that is causing the error? What’s the filename and path of the mp3 you’re trying to open? And what package are you using to open it?