Skip to content

aider-ce --commit throws asyncio exception #177

@Konfekt

Description

@Konfekt

With aider-ce 0.88.25 aider-ce --commit throws

ERROR:asyncio:an error occurred during closing of asynchronous generator <async_generator object stdio_client at 0x75c5d8c73a00>
asyncgen: <async_generator object stdio_client at 0x75c5d8c73a00>
  + Exception Group Traceback (most recent call last):
  |   File "/home/konfekt/.local/share/uv/tools/aider-ce/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 781, in __aexit__
  |     raise BaseExceptionGroup(
  | BaseExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/home/konfekt/.local/share/uv/tools/aider-ce/lib/python3.12/site-packages/mcp/client/stdio/__init__.py", line 189, in stdio_client
    |     yield read_stream, write_stream
    | GeneratorExit
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/konfekt/.local/share/uv/tools/aider-ce/lib/python3.12/site-packages/mcp/client/stdio/__init__.py", line 183, in stdio_client
    anyio.create_task_group() as tg,
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/konfekt/.local/share/uv/tools/aider-ce/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 787, in __aexit__
    if self.cancel_scope.__exit__(type(exc), exc, exc.__traceback__):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/konfekt/.local/share/uv/tools/aider-ce/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 459, in __exit__
    raise RuntimeError(
RuntimeError: Attempted to exit cancel scope in a different task than it was entered in
ERROR:asyncio:an error occurred during closing of asynchronous generator <async_generator object stdio_client at 0x75c5d8c73b50>
asyncgen: <async_generator object stdio_client at 0x75c5d8c73b50>
  + Exception Group Traceback (most recent call last):
  |   File "/home/konfekt/.local/share/uv/tools/aider-ce/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 781, in __aexit__
  |     raise BaseExceptionGroup(
  | BaseExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/home/konfekt/.local/share/uv/tools/aider-ce/lib/python3.12/site-packages/mcp/client/stdio/__init__.py", line 189, in stdio_client
    |     yield read_stream, write_stream
    | GeneratorExit
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/konfekt/.local/share/uv/tools/aider-ce/lib/python3.12/site-packages/mcp/client/stdio/__init__.py", line 183, in stdio_client
    anyio.create_task_group() as tg,
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/konfekt/.local/share/uv/tools/aider-ce/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 787, in __aexit__
    if self.cancel_scope.__exit__(type(exc), exc, exc.__traceback__):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/konfekt/.local/share/uv/tools/aider-ce/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 459, in __exit__
    raise RuntimeError(
RuntimeError: Attempted to exit cancel scope in a different task than it was entered in
/home/konfekt/.local/share/uv/tools/aider-ce/lib/python3.12/site-packages/litellm/llms/custom_httpx/async_client_cleanup.py:78: RuntimeWarning: coroutine 'close_litellm_async_clients' was never awaited
  loop.close()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

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