-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
UnicodeDecodeError when trying to read non-text files #56
Comments
Got the same error. If you have e.g. such sign: ❓ in your code you cannot add it to aider and the app throws an error.> |
I just merged a fix for this issue. You'll have to install the latest from github to pick it up. I'll release it to pypi soon. Please let me know if you continue to see any unicode errors. |
The fix is now on pypi in v0.8.0 and will be installed if you do |
I'm going to close this issue, but feel free to re-open or file a new issue if you want to follow up. |
Is this fixed for windows as well? I just installed v0.8.2 from git. The same happens in cmd and powershell.
|
Thanks for reporting this. Apologies, I missed a couple of |
Thanks for fixing it. I have tested the latest version (v0.8.2) from Git, and it seems to be working fine now. |
I'm going to close this issue for now, but feel free to re-open or file a new issue if you have any further problems. |
mypath.../node_modules/faker/lib/locales/it/name/first_name.js: 'utf-8' codec can't Is there anyway to have Aider ignore node_modules? I'm not sure if this issue is related, but I've already tried upgrading Aider. It also seems to hang. du -sh .aider.* My project is 241M if I include Aiders 166M cache (so far).... it may have been caching things, but i'm not sure. It seems to be hanging.... |
Should I open a new issue? I've waited a few hours and it's doing nothing.
|
Describe the bug
When running the aider tool on a directory containing non-text files such as images (png, jpg, etc.), the program crashes with a
UnicodeDecodeError
.To Reproduce
Steps to reproduce the behavior:
/add
on a directory that contains non-text filesExpected behavior
The
aider
tool should be able to skip non-text files or handle them appropriately without crashing.Error message
Similar to issue #28 but I believe this is different enough behavior/usecase to create a separate issue.
What's happening:
Aider seems to be unable to handle files that are not UTF-8 encoded, and when
/add
is called on a directory that contains such files the programs errors and exits. I believe thataider
should handle (at least by default) files that are not specifically UTF-8 text files by silently rejecting them or just ignoring them.OS: fedora 37
python: 3.11.3
aider: installed with
pip install git+https://github.com/paul-gauthier/aider.git
so I'm assuming it's latest (update: 0.7.2)The text was updated successfully, but these errors were encountered: