From 5b42bdca90986be35a90c555ff60543fd47504aa Mon Sep 17 00:00:00 2001 From: "pierre-francois.duc" Date: Tue, 19 Mar 2024 16:23:24 +0100 Subject: [PATCH] Prevent load from excel to throw error if new attribute not present --- ramp/core/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ramp/core/core.py b/ramp/core/core.py index 8ea65739..3cf3d824 100644 --- a/ramp/core/core.py +++ b/ramp/core/core.py @@ -584,7 +584,10 @@ def load(self, filename: str) -> None: :, ~user_df.columns.isin(["user_name", "num_users", "user_preference"]) ].to_dict(orient="records"): # assign Appliance arguments - appliance_parameters = {k: row[k] for k in APPLIANCE_ARGS} + appliance_parameters = {} + for k in APPLIANCE_ARGS: + if k in row: + appliance_parameters[k] = row[k] # assign windows arguments for k in WINDOWS_PARAMETERS: