Model creation fails/crashes when no data is selected
nluetzge opened this issue · 1 comments
nluetzge commented
When no data is selected and I click on create new model I get a crash and this error message:
Traceback (most recent call last):
File "/Users/nluetzge/JWST/Devtools/specviz/specviz/specviz/plugins/model_editor/model_editor.py", line 146, in _on_create_new_model
new_spec = Spectrum1D(flux=np.zeros(self.hub.data_item.spectral_axis.size) * self.hub.data_item.flux.unit,
AttributeError: 'NoneType' object has no attribute 'spectral_axis'
Abort trap: 6
I think we should disable that "create new model" button when no data is selected.