A YAML value `country: NO` is loaded as `False`, and version `1.10` becomes `1.1`.
IntermediateTroubleshootingRuntime, file, subprocess & encoding errors
Answer
Likely causes → PyYAML implements YAML 1.1, where yes/no/on/off (any case) are booleans, and unquoted numbers are parsed as floats.
Diagnose →
yaml.safe_load("a: NO\nb: 1.10\nc: 010") # {'a': False, 'b': 1.1, 'c': 8}
Fix → Quote strings in the YAML ("NO", "1.10"), or use ruamel.yaml (YAML 1.2 by default, where NO is a string) for files you do not control.
Prevent → Lint YAML with yamllint (truthy rule) and quote version strings.
More on Runtime, file, subprocess & encoding errors
`KeyError: 'Tags'` while processing `describe_instances` output.Beginner`TypeError: can't compare offset-naive and offset-aware datetimes` in a snapshot-age check.Beginner`UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte` reading a log file.Intermediate`UnicodeEncodeError: 'ascii' codec can't encode character '✓'` when printing in a container.Intermediate`PermissionError: [Errno 13] Permission denied: '/var/log/app/report.json'`Intermediate`OSError: [Errno 24] Too many open files` in a long-running Python service.Intermediate