Using and Mastering Cookiecutter Transcripts
Chapter: Advanced Cookiecutter usage
Lecture: Careful with that YAML file

Login or purchase this course to watch this video and the rest of the course contents.
0:01 Let me show you something that I ran into that seems really touchy, with these default value files, we come over here
0:09 and we can run our cookiecutter cookiecutter-bottle and it gives us our values, everything looked great, and that looked super easy, right.
0:15 Well, let's go and make the most minor change, and notice that there is a line 5 that is empty here,
0:21 if you are unfortunate enough to not have hit enter and then backed up one time, you're going to run into something weird,
0:28 so let's leave it like this, right, all I did was remove that last blank line, I changed nothing else about it, and now let's try this again,
0:34 if I hit enter, bam, unable to parse the YAML file, error, none of the patterns match for GitHub usernames, like oh what is this.
0:42 So apparently, I am not sure where this touchiness lies, is this Cookiecutter's built-in YAML parser, is this actually the YAML specification,
0:50 I don't know, but let me just tell you, you really need a newline there, so now if I do it again, everything works like a charm.
0:59 Okay, so super important, you have a blank line there.

Talk Python's Mastodon Michael Kennedy's Mastodon