Panniantong/Agent-Reach · error · MissingDependency
{binary} not found in PATH
Error message
{binary} not found in PATH What it means
Raised by _require() in agent_reach/transcribe.py (as MissingDependency, a TranscribeError subclass) when shutil.which() cannot find the named external binary — in practice 'ffmpeg' or 'ffprobe' — in PATH. The transcription pipeline shells out to ffmpeg/ffprobe, so they must be installed on the host, not pip-installed.
Source
Thrown at agent_reach/transcribe.py:80
class MissingDependency(TranscribeError):
"""Raised when a required external binary is missing."""
class NoProviderConfigured(TranscribeError):
"""Raised when no provider has an API key configured."""
_BLOCKED_HOSTS = {
"localhost",
"metadata.google.internal",
}
def _require(binary: str) -> None:
if not shutil.which(binary):
raise MissingDependency(f"{binary} not found in PATH")
def _require_size_at_most(path: Path, limit: int, label: str) -> int:
"""Return file size or fail before expensive downstream processing."""
size = path.stat().st_size
if size > limit:
limit_mib = limit / (1024 * 1024)
raise TranscribeError(f"{label} exceeds safety limit of {limit_mib:g} MiB")
return size
def _probe_audio_duration(path: Path) -> float:
"""Return duration in seconds or fail closed before media generation."""
_require("ffprobe")
cmd = [
"ffprobe",
"-v",
"error",View on GitHub (pinned to 93ae1d18c3)
Solutions
- Install the binaries: apt-get install ffmpeg / brew install ffmpeg / winget install ffmpeg
- Verify with `ffprobe -version` in the exact environment that runs the code
- For service managers, set PATH explicitly (e.g. Environment= in systemd units) or pass an absolute path by symlinking into /usr/local/bin
Example fix
# before: MissingDependency: ffprobe not found in PATH transcribe_audio(path) # after (debian/ubuntu) sudo apt-get install -y ffmpeg transcribe_audio(path)
Defensive patterns
Strategy: validation
Validate before calling
import shutil
missing = [b for b in ('ffmpeg', 'ffprobe') if not shutil.which(b)]
if missing:
raise RuntimeError(f'install required binaries: {missing}') Type guard
def transcribe_ready() -> bool:
import shutil
return all(shutil.which(b) for b in ('ffmpeg', 'ffprobe')) Try / catch
from agent_reach.transcribe import MissingDependency
try:
transcribe_audio(path)
except MissingDependency as e:
raise SystemExit(f'prerequisite missing: {e}; install ffmpeg') from e Prevention
- Add ffmpeg to container/CI images
- Check shutil.which in a startup doctor rather than at transcription time
- Beware PATH differences under cron/systemd/IDE launchers
When it happens
Trigger: Any transcribe call on a host without ffmpeg/ffprobe installed, or where they are installed but the directory is not on PATH (common in cron, systemd, or IDE-spawned shells).
Common situations: Fresh container/CI image without the ffmpeg package; macOS using a python.org interpreter that drops Homebrew /opt/homebrew/bin from PATH; Windows without ffmpeg on PATH.
Related errors
- ffprobe could not read audio duration: {exc}
- curl is unavailable for the V2EX TLS fallback
- Cookie extraction{profile_hint} requires browser_cookie3 (or
- {cmd[0]} timed out after {timeout}s
- {cmd[0]} failed (exit {proc.returncode}): {proc.stderr.strip
AI-assisted analysis of Panniantong/Agent-Reach@93ae1d18c3 (2026-08-14).
Data as JSON: /api/errors/37214923af7440f0.
Report an issue: GitHub.