Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when running aider --show-repo-map > map.md on Windows 11 #3326

Open
dmitrymelb opened this issue Feb 21, 2025 · 0 comments
Open

Comments

@dmitrymelb
Copy link

Issue

Running aider --show-repo-map > map.md command in Windows 11 CMD or Bash generates the exception described below. The command execution hangs and requires Ctrl + C to terminate.

=====
Can't initialize prompt toolkit: 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.
Can't initialize prompt toolkit: 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.
Terminal does not support pretty output (UnicodeDecodeError)
Aider v0.74.2
Model: gemini/gemini-2.0-flash-001 with whole edit format
Git repo: .git with 432 files
Repo-map: using 2048 tokens, files refresh
Here are summaries of some files present in my git repository.
Do not propose changes to these files, treat them as read-only.
If you need to edit any of these files, ask me to add them to the chat first.

aider\args.py:

Uncaught UnicodeEncodeError in cp1252.py line 19

Aider version: 0.74.2
Python version: 3.12.8
Platform: Windows-11-10.0.26100-SP0
Python implementation: CPython
Virtual environment: Yes
OS: Windows 11 (64bit)
Git version: git version 2.47.1.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 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 983, in main
    io.tool_output(repo_map)
  File "io.py", line 877, in tool_output
    self.console.print(*messages, style=style)
  File "console.py", line 1678, in print
    with self:
         ^^^^
  File "console.py", line 864, in __exit__
    self._exit_buffer()
  File "console.py", line 822, in _exit_buffer
    self._check_buffer()
  File "console.py", line 2019, in _check_buffer
    self._write_buffer()
  File "console.py", line 2055, in _write_buffer
    legacy_windows_render(buffer, LegacyWindowsTerm(self.file))
  File "_windows_renderer.py", line 19, in legacy_windows_render
    term.write_text(text)
  File "_win32_console.py", line 402, in write_text
    self.write(text)
  File "cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\u22ee' in position 0: character maps to <undefined>

Please consider reporting this bug to help improve aider!
Open a GitHub Issue pre-filled with the above error in your browser? (Y/n)

Version and model info

Aider v0.74.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant