Skip to content

Hang when hitting ctrl-D at prompt. #181

@pjcreath

Description

@pjcreath

Issue

Hitting ^D at the initial prompt causes a runaway hang. Adding --verbose or --debug just fills the screen with newlines.

If I re-raise exceptions at aider/coders/base_coder.py lines 1288 and 1337, I get the following backtrace.

Backtrace
Traceback (most recent call last):
  File "aider-ce/aider/coders/base_coder.py", line 1246, in input_task
    user_message = self.io.input_task.result()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aider-ce/aider/coders/base_coder.py", line 1373, in get_input
    return await self.io.get_input(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "aider-ce/aider/io.py", line 870, in get_input
    line = await self.prompt_session.prompt_async(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aider-ce/env/lib/python3.12/site-packages/prompt_toolkit/shortcuts/prompt.py", line 1252, in prompt_async
    return await self.app.run_async(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aider-ce/env/lib/python3.12/site-packages/prompt_toolkit/application/application.py", line 886, in run_async
    return await _run_async(f)
           ^^^^^^^^^^^^^^^^^^^
  File "aider-ce/env/lib/python3.12/site-packages/prompt_toolkit/application/application.py", line 746, in _run_async
    result = await f
             ^^^^^^^
EOFError
Exception ignored in: 
Traceback (most recent call last):
  File "aider-ce/env/lib/python3.12/site-packages/litellm/llms/custom_httpx/http_handler.py", line 612, in __del__
  File "aider-ce/aider/main.py", line 485, in custom_tracer
ImportError: sys.meta_path is None, Python is likely shutting down

Version and model info

Aider v0.88.26

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