From 710e4fc1d7ea7a7885b977fb55d394fc9ac15ae2 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 5 Sep 2025 12:33:43 -0400 Subject: [PATCH] Explain the `infect_asyncio: bool` param to pass in RTE msg --- tractor/to_asyncio.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tractor/to_asyncio.py b/tractor/to_asyncio.py index bd46a5ab..8c22f84d 100644 --- a/tractor/to_asyncio.py +++ b/tractor/to_asyncio.py @@ -337,9 +337,12 @@ def _run_asyncio_task( ''' __tracebackhide__: bool = hide_tb - if not tractor.current_actor().is_infected_aio(): + if not (actor := tractor.current_actor()).is_infected_aio(): raise RuntimeError( - "`infect_asyncio` mode is not enabled!?" + f'`infect_asyncio: bool` mode is not enabled ??\n' + f'Ensure you pass `ActorNursery.start_actor(infect_asyncio=True)`\n' + f'\n' + f'{actor}\n' ) # ITC (inter task comms), these channel/queue names are mostly from