Skip to content

TypeError during creation of CDP session #162

@rishwanth-aiseberg

Description

@rishwanth-aiseberg
2025-07-23 12:05:49 DEBUG - Creating new persistent CDP session.
Task exception was never retrieved
future: <Task finished name='Task-7' coro=<StagehandPage._wait_for_settled_dom.<locals>.timeout_guard() done, defined at /home/rishw/extractions/verbatim_scraper/.venv/lib/python3.11/site-packages/stagehand/page.py:612> exception=TypeError("StagehandLogger.debug() got an unexpected keyword argument 'extra'")>
Traceback (most recent call last):
  File "/home/rishw/extractions/verbatim_scraper/.venv/lib/python3.11/site-packages/stagehand/page.py", line 616, in timeout_guard
    self._stagehand.logger.debug(
TypeError: StagehandLogger.debug() got an unexpected keyword argument 'extra'
2025-07-23 12:05:53 DEBUG - got accessibility tree in 226ms (processing: 66ms)
2025-07-23 12:05:53 INFO - Getting accessibility tree data
2025-07-23 12:05:53 INFO - Calling LLM
2025-07-23 12:05:53 DEBUG llm - Calling litellm.completion with model=azure/gpt-4.1-mini and params:

While i was running extractions.. i was seeing the above error. it can be safely ignored as its not effecting the main functionality.

but it coming from 2 places

self._stagehand.logger.debug(
    "⚠️ DOM-settle timeout reached – network requests still pending",
    extra={"count": len(inflight)},  # ← This 'extra' parameter is not supported
)
self._stagehand.logger.debug(
    "⏳ forcing completion of stalled iframe document",
    extra={"url": request_meta["url"][:120]},  # ← This 'extra' parameter is not supported
)

the extra argument is not supported by stagehand.logger is my understanding

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions