From f738275d21220575a4fca74961ffd6f0032ddc8f Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sat, 16 Oct 2021 07:17:36 -0500 Subject: [PATCH] yell about config validation errors for the people in the back --- frigate/app.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/frigate/app.py b/frigate/app.py index c1a9b6f48..bab570093 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -12,6 +12,7 @@ import yaml from peewee_migrate import Router from playhouse.sqlite_ext import SqliteExtDatabase from playhouse.sqliteq import SqliteQueueDatabase +from pydantic import ValidationError from frigate.config import DetectorTypeEnum, FrigateConfig from frigate.const import CACHE_DIR, CLIPS_DIR, RECORD_DIR @@ -320,7 +321,19 @@ class FrigateApp: try: self.init_config() except Exception as e: - print(f"Error parsing config: {e}") + print("*************************************************************") + print("*************************************************************") + print("*** Your config file is not valid! ***") + print("*** Please check the docs at ***") + print("*** https://docs.frigate.video/configuration/index ***") + print("*************************************************************") + print("*************************************************************") + print("*** Config Validation Errors ***") + print("*************************************************************") + print(e) + print("*************************************************************") + print("*** End Config Validation Errors ***") + print("*************************************************************") self.log_process.terminate() sys.exit(1) self.set_environment_vars()