aider
aider copied to clipboard
Uncaught NoConsoleScreenBufferError in win32.py line 219
Aider version: 0.56.0 Python version: 3.11.7 Platform: Windows-10-10.0.22631-SP0 Python implementation: CPython Virtual environment: No OS: Windows 10 (64bit) Git version: git version 2.45.2.windows.1
An uncaught exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "__main__.py", line 7, in <module>
sys.exit(main())
^^^^^^
File "main.py", line 698, in main
coder.run()
File "base_coder.py", line 734, in run
user_message = self.get_input()
^^^^^^^^^^^^^^^^
File "base_coder.py", line 747, in get_input
return self.io.get_input(
^^^^^^^^^^^^^^^^^^
File "io.py", line 345, in get_input
session = PromptSession(
^^^^^^^^^^^^^^
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.
Thank you for filing this issue.
The fix is available in the main branch. You can get it by installing the latest version from GitHub:
aider --install-main-branch
# or.
python -m pip install --upgrade git+https://github.com/paul-gauthier/aider.git
If you have a chance to try it, please report if it works better for you.
This looks like a duplicate of #1244, so I'm going to close it so discussion can happen there. Please let me know if you think it's actually a distinct issue.