Suppress pydub warning about ffmpeg/avconv not found (#8940)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Robert Brennan
2025-06-17 14:44:32 -04:00
committed by GitHub
parent 237037cee9
commit 147ffb7e42
3 changed files with 12 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ from prompt_toolkit.formatted_text import HTML
from prompt_toolkit.shortcuts import clear
import openhands.agenthub # noqa F401 (we import this to get the agents registered)
import openhands.cli.suppress_warnings # noqa: F401
from openhands.cli.commands import (
check_folder_security_agreement,
handle_commands,

View File

@@ -0,0 +1,10 @@
"""Module to suppress common warnings."""
import warnings
# Suppress pydub warning about ffmpeg/avconv
warnings.filterwarnings(
'ignore',
message="Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work",
category=RuntimeWarning,
)

View File

@@ -5,6 +5,7 @@ from pathlib import Path
from typing import Callable, Protocol
import openhands.agenthub # noqa F401 (we import this to get the agents registered)
import openhands.cli.suppress_warnings # noqa: F401
from openhands.controller.agent import Agent
from openhands.controller.replay import ReplayManager
from openhands.controller.state.state import State