Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Fix: Use ProactorEventLoop on Windows for Playwright compatibility

Anirudha619dda842a199ac
diff --git a/browser_use/__init__.py b/browser_use/__init__.py
index 30a37bdac..416200bea 100644
--- a/browser_use/__init__.py
+++ b/browser_use/__init__.py
@@ -8,7 +8,7 @@ logger = setup_logging()
# Set Windows event loop policy for Playwright compatibility
if sys.platform.startswith('win'):
try:
- asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
+ asyncio.set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy())
except Exception as e:
logger.error(f'❌ Failed to set Windows event loop policy: {type(e).__name__}: {e}')