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

Uncaught UnicodeEncodeError in cp1252.py line 19 #3483

Closed
DinoChiesa opened this issue Mar 10, 2025 · 1 comment
Closed

Uncaught UnicodeEncodeError in cp1252.py line 19 #3483

DinoChiesa opened this issue Mar 10, 2025 · 1 comment

Comments

@DinoChiesa
Copy link

Aider version: 0.75.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.48.1.windows.1

An uncaught exception occurred:

Traceback (most recent call last):
  File "io.py", line 845, in _tool_message
    self.console.print(message, **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 '\u2588' in position 39: character maps to <undefined>

During handling of the above exception, another 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 1081, in main
    coder.run()
  File "base_coder.py", line 832, in run
    self.run_one(user_message, preproc)
  File "base_coder.py", line 879, in run_one
    list(self.send_message(message))
  File "base_coder.py", line 1417, in send_message
    self.reply_completed()
  File "architect_coder.py", line 43, in reply_completed
    editor_coder.run(with_message=content, preproc=False)
  File "base_coder.py", line 825, in run
    self.run_one(with_message, preproc)
  File "base_coder.py", line 879, in run_one
    list(self.send_message(message))
  File "base_coder.py", line 1446, in send_message
    lint_errors = self.lint_edited(edited)
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1540, in lint_edited
    self.io.tool_warning(res)
  File "io.py", line 858, in tool_warning
    self._tool_message(message, strip, self.tool_warning_color)
  File "io.py", line 851, in _tool_message
    self.console.print(message, **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 '\u2588' in position 39: character maps to <undefined>

Copy link

Thanks for trying aider and filing this issue.

This looks like a duplicate of #1281. Please see the comments there for more information, and feel free to continue the discussion within that issue.

I'm going to close this issue for now. But please let me know if you think this is actually a distinct issue and I will reopen this issue.

Note: A bot script made these updates to the issue.

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