The user jo-andre encountered a YAML syntax error during a Discourse reinstallation, initially caused by whitespace on line 1 of the containers/*.yml file. After removing the whitespace, the issue persisted, prompting IAmGav to review the config. The actual problem was discovered to be an invalid " character in the SMTP password, which was resolved by removing it and rebuilding the app IAmGav. pfaffman advised caution with YAML formatting, suggesting the use of discourse-setup to avoid such issues and emphasizing that even small spacing errors or special characters can break the configuration.
Ive got an issue when reinstalling Discourse.
Here’s the error:
(<unknown>): control characters are not allowed at line 1 column 1 -e LANG=en_US.UTF-8
YAML syntax error. Please check your containers/*.yml config files.
i used yamllint too check the config. here’s the result.
It was nothing!.. And by that i mean whitespace… Of course i read this now. YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!
not used to whitespace being a problem in coding. Thank you very much! and sorry for bothering you
The easiest thing is probably to delete your app.yml and run discourse-setup again. It could literally be a single extra or missing space most anywhere. Or tab instead of some spaces. Maybe you can figure it out with yamlint, or maybe you’ll always mess something up when you copy to or from it.
If what you did to break it was add plugins, see that next time you copy/paste the existing git clone line and edit it. That way you can’t mess up the spacing.