Skip to content

Commit 08af605

Browse files
update comment
1 parent 932e745 commit 08af605

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

stagehand/main.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ async def init(self):
392392
self.logger.debug(f"Environment: {self.env}")
393393

394394
# Always initialize playwright with timeout to avoid hanging
395-
# This ensures compatibility with strict event loop environments like Langgraph
395+
# This ensures compatibility with strict event loop environments
396396
self._playwright = await self._init_playwright_with_timeout()
397397

398398
if self.env == "BROWSERBASE":
@@ -457,7 +457,7 @@ async def _init_playwright_with_timeout(self):
457457
Initialize playwright with a timeout to avoid hanging in strict event loop environments.
458458
459459
This method adds a timeout to the regular async_playwright().start() to prevent
460-
hanging in environments like Langgraph that restrict blocking operations.
460+
hanging in environments that restrict blocking operations.
461461
"""
462462
self.logger.debug("Starting playwright initialization with timeout...")
463463

@@ -476,8 +476,7 @@ async def _init_playwright_with_timeout(self):
476476
self.logger.error("Playwright initialization timed out")
477477
raise RuntimeError(
478478
"Playwright initialization timed out after 30 seconds. This may indicate "
479-
"your environment has strict event loop restrictions. If using Langgraph, "
480-
"consider using the --allow-blocking flag."
479+
"your environment has strict event loop restrictions."
481480
)
482481
except Exception as e:
483482
self.logger.error(f"Failed to initialize playwright: {e}")

0 commit comments

Comments
 (0)