TypeError: object bool can't be used in 'await' expression
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in client.py at the await of _event_registry.handle_event and compare it with the synchronous handle_event definition. Trace the event path and confirm the change removes the TypeError while preserving the boolean handling result and event-handler error behavior. Done means CDP events no longer await a synchronous boolean result.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 323
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from browser-use/cdp-use
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
browser-use/cdp-use#19 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
browser-use/cdp-use#18 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
browser-use/cdp-use#16 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
browser-use/cdp-use#7 ·
All issues in browser-use/cdp-use
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100