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 UnicodeDecodeError in config.py line 465 #3092

Closed
denisdifazio opened this issue Jan 31, 2025 · 1 comment
Closed

Uncaught UnicodeDecodeError in config.py line 465 #3092

denisdifazio opened this issue Jan 31, 2025 · 1 comment

Comments

@denisdifazio
Copy link

Aider version: 0.72.3
Python version: 3.12.8
Platform: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35
Python implementation: CPython
Virtual environment: Yes
OS: Linux 5.15.167.4-microsoft-standard-WSL2 (64bit)
Git version: git version 2.46.1

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 720, in main
    git_root = setup_git(git_root, io)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "main.py", line 133, in setup_git
    user_name = config.get_value("user", "name", None)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "config.py", line 793, in get_value
    valuestr = self.get(section, option)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "config.py", line 113, in assure_data_present
    self.read()
  File "config.py", line 630, in read
    self._read(fp, fp.name)
  File "config.py", line 465, in _read
    line = fp.readline().decode(defenc)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb3 in position 41: invalid start byte

This happens when i try to open aider in a dir with a git project. I tried erasing the existing .git folder and let aider create it, but the same error occurs.

@denisdifazio
Copy link
Author

The problem was my .gitconfig file at root. It contained some custom configuration for delta diff

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