Fixes bug 9682 (#9692)

Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
This commit is contained in:
Neeraj Panwar 2025-08-22 22:21:53 +05:30 committed by GitHub
parent d22a2e39e7
commit df86fd275d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,5 @@
import openhands.cli.suppress_warnings # noqa: F401 # isort: skip
import asyncio
import logging
import os
@ -8,7 +10,6 @@ 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

@ -41,6 +41,12 @@ def suppress_cli_warnings():
category=UserWarning,
)
# Suppress SyntaxWarnings from pydub.utils about invalid escape sequences
warnings.filterwarnings(
'ignore',
category=SyntaxWarning,
module=r'pydub\.utils',
)
# Suppress LiteLLM close_litellm_async_clients was never awaited warning
warnings.filterwarnings(
'ignore',

View File

@ -1,9 +1,13 @@
import os
import warnings
import uvicorn
def main():
# Suppress SyntaxWarnings from pydub.utils about invalid escape sequences
warnings.filterwarnings('ignore', category=SyntaxWarning, module=r'pydub\.utils')
uvicorn.run(
'openhands.server.listen:app',
host='0.0.0.0',