Skip to content

TypeError: object bool can't be used in 'await' expression #10

@Ehsan-U

Description

@Ehsan-U

Seems like its happening due to use of await on synchronous handle_event in the client.py

handled = await self._event_registry.handle_event(
    method, params, session_id
)
def handle_event(
    self,
    method: str,
    params: Any,
    session_id: Optional[str] = None,
) -> bool:
    """
    Handle an incoming CDP event.
    ...
    Returns:
        True if a handler was found and called, False otherwise
    """
    if method in self._handlers:
        try:
            self._handlers[method](params, session_id)
            return True
        except Exception as e:
            logger.error(f"Error in event handler for {method}: {e}")
            return False
    return False

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