-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
"Override settings from command line" feature errors when no overrides given #2789
Comments
@sabaini : Any thoughts on this? |
My bad. Missed some obvious issues in the review. After a quick look, following might be enough to fix. Here: Lines 664 to 665 in 74692a3
this addition def coerce_overrides(overrides):
if overrides is None:
return {}
coerced = {} And this: Line 668 in 74692a3
changed to: if k not in DEFAULT_CONFIG: PS: |
Thanks for reporting this, @jwodder. The fix proposed by @avaris seems to resolve the problem in my (admittedly limited) testing, so I just pushed a commit including those changes: 45c5cb9 Thank you, @avaris! 👏 Another thing I noticed is that capitalized Boolean values, such as the one I provided as an example in the docs, yield this error:
Lower-case Boolean values seem to work fine. For the moment, I changed the example in the docs to use a lower-case Boolean value. But it would be nice to fix this properly and help users avoid running into critical errors. |
Changing from: types_to_cast = {int, str} … to: types_to_cast = {int, str, bool} … seems to fix the aforementioned error and works with both lowercase and uppercase Boolean values. Anyone see any potentially unforeseen problems with this fix? |
I went ahead and made the above-mentioned Boolean-related change. Despite tests passing locally, GitHub CI is reporting some kind of internal error that I don't understand and that I suspect is unrelated to the small change in the last commit. Maybe related to parallel testing via @jwodder: Can you test latest master and see whether the first item you reported here has been resolved? |
@justinmayer The problem has been resolved. |
Issue
After this commit was made, trying to build with the latest development version of Pelican errors out. Running
pelican -s pelicanconf.py --debug
outputs the following:I believe the problem is that
args.overrides
isNone
when no--extra-settings
arguments are given on the command line. Attempting to test this theory by adding--extra-settings AUTHOR=Me
made pelican fail with a different error:The text was updated successfully, but these errors were encountered: