Config: Add warning on exceptions and clarify parameters

Due to how YAML works, double quotes are bad. Specify a linter in
the top of the config_sample file.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri 2023-11-16 21:48:08 -05:00
parent feef782dbf
commit 08a183540b
2 changed files with 15 additions and 7 deletions

View file

@ -194,7 +194,12 @@ if __name__ == "__main__":
try:
with open('config.yml', 'r') as config_file:
config = yaml.safe_load(config_file) or {}
except:
except Exception as e:
print(
"The YAML config couldn't load because of the following error:",
f"\n\n{e}",
"\n\nTabbyAPI will start anyway and not parse this config file."
)
config = {}
# If an initial model name is specified, create a container and load the model