Is YAML picky about the use of spaces?

Yes! very picky see the yaml specifications