diff --git a/jdaviz/configs/specviz2d/helper.py b/jdaviz/configs/specviz2d/helper.py index fc04f974f6..d830ed7ba5 100644 --- a/jdaviz/configs/specviz2d/helper.py +++ b/jdaviz/configs/specviz2d/helper.py @@ -150,18 +150,19 @@ def load_data(self, spectrum_2d=None, spectrum_1d=None, spectrum_1d_label=None, # new defaults. We'll just call it again manually. spext._trace_dataset_selected() try: - _ = spext.create_extract(add_data=True) + spext.create_extract(add_data=True) except Exception: - msg = ("Automatic spectrum extraction failed. See the spectral extraction" - " plugin to perform a custom extraction") - msg = SnackbarMessage(msg, color='error', sender=self, timeout=10000) + msg = SnackbarMessage( + "Automatic spectrum extraction failed. See the spectral extraction" + " plugin to perform a custom extraction", + color='error', sender=self, timeout=10000) else: # Warn that this shouldn't be used for science - msg = ("The extracted 1D spectrum was generated automatically." - " See the spectral extraction plugin for details or to" - " perform a custom extraction.") - msg = SnackbarMessage(msg, color='warning', sender=self, - timeout=10000) + msg = SnackbarMessage( + "The extracted 1D spectrum was generated automatically." + " See the spectral extraction plugin for details or to" + " perform a custom extraction.", + color='warning', sender=self, timeout=10000) self.app.hub.broadcast(msg) else: