From ded73f6415f42e9d5b913feb7e614bf71ebb05d3 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Fri, 31 May 2024 19:25:43 +0300 Subject: [PATCH] cli: improve YAML error message --- rendercv/cli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rendercv/cli.py b/rendercv/cli.py index b213372..d2e5146 100644 --- a/rendercv/cli.py +++ b/rendercv/cli.py @@ -378,7 +378,11 @@ def handle_exceptions(function: Callable) -> Callable: except pydantic.ValidationError as e: handle_validation_error(e) except ruamel.yaml.YAMLError as e: - error("There is a YAML error in the input file!", e) + error( + "There is a YAML error in the input file!\n\nTry to use quotation marks" + " to make sure the YAML parser understands the field is a string.", + e, + ) except FileNotFoundError as e: error(e) except UnicodeDecodeError as e: