From 9a8c0e6baab325872a74a2e96407314cd3fc7898 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Wed, 18 Aug 2021 18:10:59 -0700 Subject: [PATCH] [bugfix] use get to get an empty dict if plot params don't have data key. --- autopilot/core/plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autopilot/core/plots.py b/autopilot/core/plots.py index fcc2ae5c..669d6d65 100644 --- a/autopilot/core/plots.py +++ b/autopilot/core/plots.py @@ -365,7 +365,7 @@ def l_start(self, value): pass # Make plot items for each data type - for data, plot in self.plot_params['data'].items(): + for data, plot in self.plot_params.get('data', {}).items(): # TODO: Better way of doing params for plots, redo when params are refactored if plot == 'rollmean' and 'roll_window' in self.plot_params.keys(): self.plots[data] = Roll_Mean(winsize=self.plot_params['roll_window'])