From f6d25edff88c13c935a2d48cdb11eac52730b56e Mon Sep 17 00:00:00 2001 From: Chaz Larson Date: Tue, 24 Dec 2024 11:14:15 -0600 Subject: [PATCH] Nobody knows what `\t` is. --- modules/request.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/request.py b/modules/request.py index 59dcab77..0c5a1b5b 100644 --- a/modules/request.py +++ b/modules/request.py @@ -259,7 +259,11 @@ class YAML: with open(self.path, encoding="utf-8") as fp: self.data = self.yaml.load(fp) except ruamel.yaml.error.YAMLError as e: - e = str(e).replace("\n", "\n ") + if "found character '\\t' that cannot start any token" in e.problem: + e = "Tabs are not allowed in YAML files; only spaces are allowed" + else: + e = str(e).replace("\n", "\n ") + raise Failed(f"YAML Error: {e}") except Exception as e: raise Failed(f"YAML Error: {e}")