You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This probably makes sense in theory, if you're in the builder and delete layers until 1 layer is left, the server will throw (repeatedly) a very lengthy exception, including:
Traceback (most recent call last):
File "/home/ge2/miniforge3/envs/refl1d/lib/python3.12/site-packages/bumps/serialize.py", line 95, in _rehydrate
hydrated = _instantiate(klass, t, obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ge2/miniforge3/envs/refl1d/lib/python3.12/site-packages/bumps/serialize.py", line 116, in _instantiate
raise e
File "/home/ge2/miniforge3/envs/refl1d/lib/python3.12/site-packages/bumps/serialize.py", line 113, in _instantiate
hydrated = class_factory(**s)
^^^^^^^^^^^^^^^^^^
File "/home/ge2/dev/ornl/refl1d/refl1d/models/experiment.py", line 412, in __init__
self._substrate = self.sample[0].material
~~~~~~~~~~~^^^
File "/home/ge2/dev/ornl/refl1d/refl1d/models/sample/layers.py", line 503, in __getitem__
return stack._layers[idx]
~~~~~~~~~~~~~^^^^^
IndexError: list index out of range
And the final layer cannot be deleted.
From a refl1d perspective, I'm sure this makes sense, but from an app design perspective, the user should be able to delete however many layers they want, and rebuild it from the ground up if they desire.
It's a silent failure too, so the app doesn't crash or anything, but it would be nice to handle this more gracefully.
The text was updated successfully, but these errors were encountered:
This probably makes sense in theory, if you're in the builder and delete layers until 1 layer is left, the server will throw (repeatedly) a very lengthy exception, including:
And the final layer cannot be deleted.
From a refl1d perspective, I'm sure this makes sense, but from an app design perspective, the user should be able to delete however many layers they want, and rebuild it from the ground up if they desire.
It's a silent failure too, so the app doesn't crash or anything, but it would be nice to handle this more gracefully.
The text was updated successfully, but these errors were encountered: