From 55b59f784ada442385fc012aa96162c8eafe8cbb Mon Sep 17 00:00:00 2001 From: Lex <86126040+alexiacrumpton@users.noreply.github.com> Date: Thu, 29 Feb 2024 16:29:29 -0500 Subject: [PATCH] Fix YAML Load error --- scripts/generate_sensors.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/generate_sensors.py b/scripts/generate_sensors.py index 29e0eb48..560c5390 100755 --- a/scripts/generate_sensors.py +++ b/scripts/generate_sensors.py @@ -112,7 +112,10 @@ def generateSensorsForAnalytics(analytics, sensor_dict): data_models = [] for dmf in data_model_files: print("working on {}".format(dmf)) - data_models.append(yaml.load(open(dmf).read())) + with open(dmf) as d: + data_files = yaml.safe_load(d) + data_models.append(data_files) + #data_models.append(yaml.load(open(dmf).read())) #data_models = [yaml.load(open(data_model_file).read()) for data_model_file in data_model_files] # Parse each analytic to find its data model references (if any)