You can get an InvalidStateError exception when attempting to retrieve an exception from an asyncio Task. This will happen if we attempt to retrieve an exception from a task while the task is still running, e.g. the task is not yet done. We can avoid the InvalidStateError exception by waiting for the task to be […]
Published on March 05, 2024 10:00