paul-gauthier / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
18.1k stars 1.69k forks source link

Uncaught NoConsoleScreenBufferError in win32.py line 219 #1279

Closed griyanet closed 5 days ago

griyanet commented 1 week ago

Aider version: 0.54.10 Python version: 3.10.10 Platform: Windows-10-10.0.19045-SP0 Python implementation: CPython Virtual environment: Yes OS: Windows 10 (64bit) Git version: git version 2.24.1.windows.2

An uncaught exception occurred:

Traceback (most recent call last):
  File "runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "__main__.py", line 7, in <module>
    sys.exit(main())
  File "main.py", line 464, in main
    git_root = setup_git(git_root, io)
  File "main.py", line 76, in setup_git
    elif io.confirm_ask("No git repo found, create one to track aider's changes (recommended)?"):
  File "io.py", line 453, in confirm_ask
    res = prompt(
  File "prompt.py", line 1423, in prompt
    session: PromptSession[str] = PromptSession(history=history)
  File "prompt.py", line 476, in __init__
    self.app = self._create_application(editing_mode, erase_when_done)
  File "prompt.py", line 727, in _create_application
    application: Application[_T] = Application(
  File "application.py", line 267, in __init__
    self.output = output or session.output
  File "current.py", line 67, in output
    self._output = create_output()
  File "defaults.py", line 87, in create_output
    return Win32Output(stdout, default_color_depth=color_depth_from_env)
  File "win32.py", line 115, in __init__
    info = self.get_win32_screen_buffer_info()
  File "win32.py", line 219, in get_win32_screen_buffer_info
    raise NoConsoleScreenBufferError
prompt_toolkit.output.win32.NoConsoleScreenBufferError: Found xterm, while expecting a Windows console. Maybe try to run this program using "winpty" or run it in cmd.exe instead. Or otherwise, in case of Cygwin, use the Python executable that is compiled for Cygwin.
paul-gauthier commented 1 week ago

Thanks for trying aider and filing this issue.

What shell or terminal environment did you use to run aider?

paul-gauthier commented 5 days ago

I'm going to close this issue for now, but feel free to add a comment here and I will re-open. Or feel free to file a new issue any time.