π OpenHands: AI-Driven Development
Fixes bug 9682 (#9692)
Neeraj Panwardf86fd275d03
diff --git a/openhands/cli/main.py b/openhands/cli/main.pyindex 8ba3f3927c..ac9898c9cf 100644--- a/openhands/cli/main.py+++ b/openhands/cli/main.py@@ -1,3 +1,5 @@+import openhands.cli.suppress_warnings # noqa: F401 # isort: skip+import asyncioimport loggingimport os@@ -8,7 +10,6 @@ from prompt_toolkit.formatted_text import HTMLfrom prompt_toolkit.shortcuts import clearimport openhands.agenthub # noqa F401 (we import this to get the agents registered)-import openhands.cli.suppress_warnings # noqa: F401from openhands.cli.commands import (check_folder_security_agreement,handle_commands,diff --git a/openhands/cli/suppress_warnings.py b/openhands/cli/suppress_warnings.pyindex 01042cc443..1cc430a998 100644--- a/openhands/cli/suppress_warnings.py+++ b/openhands/cli/suppress_warnings.py@@ -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 warningwarnings.filterwarnings('ignore',diff --git a/openhands/server/__main__.py b/openhands/server/__main__.pyindex b2f621014b..2f57570992 100644--- a/openhands/server/__main__.py+++ b/openhands/server/__main__.py@@ -1,9 +1,13 @@import os+import warningsimport uvicorndef 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',