-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
AttributeError when parsing configuration file with "yes" option #767
Comments
Thanks for trying aider and filing this issue. Per the configargparse docs it looks like booleans should be set like: https://github.com/bw2/ConfigArgParse
I will update the sample |
…to use more flexible DefaultConfigFileParser #767
Sorry, this looks like it indeed a bug. Configargparse docs claim that Removing the The change is available in the main branch. You can get it by installing the latest version from github:
If you have a chance to try it, let me know if it works better for you. |
Thanks! Tested locally, looks good on my end. Tested:
dark-mode: true
dirty-commits: false
attribute-author: false
attribute-committer: false
auto-lint: false
lint: false
yes: true |
I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time. |
Just went down a rabbit hole to find out why configargparse wouldn't parse a proper yaml config file. Yaml treats Solutions aren't great:
|
Relevant: yaml/pyyaml#376 I renamed |
Now aider can read proper yaml files, including bulleted lists:
|
Issue
When attempting to start aider version v0.41.0, an AttributeError is raised if the
.aider.conf.yml
configuration file in the user's home directory contains a boolean value (e.g.,true
orfalse
) or a string representation of a boolean value (e.g.,'true'
or'false'
). The error occurs because theconfigargparse
library is trying to call thestrip()
method on a boolean or string object, which is not supported.Steps to Reproduce:
.aider.conf.yml
file in the user's home directory.aider
in the terminal.Expected Behavior:
Aider should start up normally without any errors, regardless of whether the configuration file contains boolean values or string representations of boolean values.
Actual Behavior:
An AttributeError is raised with the following stack trace:
The error occurs regardless of whether the value is
true
,false
,'true'
, or'false'
.Version and model info
Aider version: v0.41.0
Python version: 3.11
Operating System: macOS
The text was updated successfully, but these errors were encountered: