mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
fix: Ignore decoding errors when reading text files
This commit is contained in:
parent
dd857aeccf
commit
f67ea5d010
1 changed files with 1 additions and 2 deletions
|
@ -368,8 +368,7 @@ class InputOutput:
|
|||
return self.read_image(filename)
|
||||
|
||||
try:
|
||||
# ignore decoding errors. ai!
|
||||
with open(str(filename), "r", encoding=self.encoding) as f:
|
||||
with open(str(filename), "r", encoding=self.encoding, errors='ignore') as f:
|
||||
return f.read()
|
||||
except FileNotFoundError:
|
||||
if not silent:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue