Layer.__init__: ValueError on num.of pulses is fatal, not warning

error message changed accordingly
This commit is contained in:
2026-02-09 15:04:35 +01:00
parent 9dbf523190
commit c5f85b2618

View File

@@ -44,9 +44,9 @@ class Layer:
except ValueError: except ValueError:
# Since number_of_pulses is required, if it can't be calculated raise error: # Since number_of_pulses is required, if it can't be calculated raise error:
raise ValueError(""" raise ValueError("""
Warning: either Duration or Repetition Rate are empty or invalid. Fatal: either Duration or Repetition Rate are empty or invalid.
If you think this is an error, please edit your eLabFTW entry and retry. This has to be an error, since these fields are required by the NeXus standard.
Setting Number of Pulses to NoneType. Please edit your eLabFTW entry and retry.
""") """)
# TO-DO: remove trailing space on eLabFTW's template for deposition layers # TO-DO: remove trailing space on eLabFTW's template for deposition layers
self.temperature = self.extra["Heater temperature "]["value"] # TYPO: trailing space, must fix on elabftw self.temperature = self.extra["Heater temperature "]["value"] # TYPO: trailing space, must fix on elabftw