Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant find my file despite it being present in the directory #764

Open
TomWaterCode opened this issue Dec 18, 2023 · 0 comments
Open

cant find my file despite it being present in the directory #764

TomWaterCode opened this issue Dec 18, 2023 · 0 comments

Comments

@TomWaterCode
Copy link

TomWaterCode commented Dec 18, 2023

Steps to reproduce

from pydub import AudioSegment

song = AudioSegment.from_file("C:/Users/TomWa/OneDrive/Documents/N.Y. State of Mind.mp4","mp4")
song.export("mashup.mp3", format="mp3")

Expected behavior

should convert the audio to mp3

Actual behavior

Warning (from warnings module):
File "C:\Users\TomWa\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydub\utils.py", line 170
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work

Warning (from warnings module):
File "C:\Users\TomWa\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydub\utils.py", line 198
warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning)
RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work
Traceback (most recent call last):
File "C:\Users\TomWa\OneDrive\Documents\Tom\projects\python\hustle\test.py", line 3, in
song = AudioSegment.from_file("C:/Users/TomWa/OneDrive/Documents/N.Y. State of Mind.mp4","mp4")
File "C:\Users\TomWa\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydub\audio_segment.py", line 728, in from_file
info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)
File "C:\Users\TomWa\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydub\utils.py", line 274, in mediainfo_json
res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
File "C:\Users\TomWa\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\TomWa\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

Your System configuration

  • Python version: 3.11.5
  • Pydub version: 0.25.1
  • ffmpeg or avlib?: ffmpeg
  • ffmpeg/avlib version:

image

@TomWaterCode TomWaterCode changed the title Errno 13 permission denied from trying to segment file cant find my file despite it being present in the directory Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant