diff --git a/jdaviz/configs/default/plugins/plot_options/plot_options.py b/jdaviz/configs/default/plugins/plot_options/plot_options.py index de50d5e17b..4c1a5e6e4c 100644 --- a/jdaviz/configs/default/plugins/plot_options/plot_options.py +++ b/jdaviz/configs/default/plugins/plot_options/plot_options.py @@ -1062,6 +1062,10 @@ def _update_stretch_curve(self, msg=None): plane = layer_cmap(data) else: # Color (Monochromatic) + if self.image_color_value is None: + # do not crash if image_color_value is not yet assigned, + # _update_stretch_curve observes image_color_value so will get called again + return False # Get color color = COLOR_CONVERTER.to_rgba_array(self.image_color_value)[0] plane = data[:, np.newaxis] * color