Skip to content

Commit c3549b5

Browse files
committed
also show yaml parsing error in error window
1 parent 66a78f3 commit c3549b5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

waveform_editor/annotations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Annotations(UserList):
66
def __str__(self):
77
sorted_annotations = sorted(self, key=lambda ann: ann["row"])
88
return "\n".join(
9-
f"Line {ann['row']}: {ann['text']}" for ann in sorted_annotations
9+
f"Line {a['row'] + 1}: {a['text']}" for a in sorted_annotations
1010
)
1111

1212
def add_annotations(self, annotations):

waveform_editor/waveform_editor_gui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ def update_plot(value):
4848

4949
# Show alert when there is a yaml parsing error
5050
if yaml_parser.has_yaml_error:
51-
yaml_alert.bject = (f"### The YAML did not parse correctly!\n {bleep}",)
51+
yaml_alert.object = f"### The YAML did not parse correctly\n {annotations}"
5252
yaml_alert.visible = True
5353
elif code_editor.annotations:
5454
error_alert.object = (
55-
f"### There was an error in the YAML configuration.\n {annotations}"
55+
f"### There was an error in the YAML configuration\n {annotations}"
5656
)
5757
error_alert.visible = True
5858
return yaml_parser.plot_tendencies()

0 commit comments

Comments
 (0)