mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 11:41:49 +02:00
fix: extreme.py improved error handling for scan types mode
This commit is contained in:
@ -403,7 +403,19 @@ class PlotApp(QWidget):
|
|||||||
self.plot_data = self.plot_data_config
|
self.plot_data = self.plot_data_config
|
||||||
elif self.scan_types is True:
|
elif self.scan_types is True:
|
||||||
currentName = metadata.get("scan_name")
|
currentName = metadata.get("scan_name")
|
||||||
|
if currentName is None:
|
||||||
|
raise ValueError(
|
||||||
|
f"Scan name not found in metadata. Please check the scan_name in the YAML config or in bec "
|
||||||
|
f"configuration."
|
||||||
|
)
|
||||||
|
return
|
||||||
self.plot_data = self.plot_data_config.get(currentName, [])
|
self.plot_data = self.plot_data_config.get(currentName, [])
|
||||||
|
if self.plot_data == []:
|
||||||
|
raise ValueError(
|
||||||
|
f"Scan name {currentName} not found in the YAML config. Please check the scan_name in the "
|
||||||
|
f"YAML config or in bec configuration."
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
# Init UI
|
# Init UI
|
||||||
self.init_ui(self.plot_settings["num_columns"])
|
self.init_ui(self.plot_settings["num_columns"])
|
||||||
|
Reference in New Issue
Block a user