The same command string works fine on terminal(macOS) but not inside Python script
youtube-dl -f "bestvideo[height<=480]+bestaudio" "video link" -o "download folder" --referer "referer url"
works fine on terminal
but on python script it outputs the error:
subprocess.call(f'''youtube-dl -f "bestvideo[height<={video_resolution}]+bestaudio" "{(url)}" -o "{path}/{id}.mp4" --referer "{(url)}"''', timeout=900)
FileNotFoundError: [Errno 2] No such file or directory: