From b4416ba838f5a1404510c09569eafdd0a520c917 Mon Sep 17 00:00:00 2001 From: Viv Date: Sat, 10 Feb 2024 18:15:59 -0500 Subject: [PATCH] `converters.py`: Change unexpected `8` from error to warning --- src/tja2fumen/converters.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tja2fumen/converters.py b/src/tja2fumen/converters.py index 38d532d..7954b3a 100644 --- a/src/tja2fumen/converters.py +++ b/src/tja2fumen/converters.py @@ -293,10 +293,12 @@ def convert_tja_to_fumen(tja: TJACourse) -> FumenCourse: # Handle '8' notes (end of a drumroll/balloon) if note_tja.value == "EndDRB": if not current_drumroll.note_type: - raise ValueError( + warnings.warn( "'8' note encountered without matching " - "drumroll/balloon/kusudama note." + "drumroll/balloon/kusudama note. Ignoring to " + "avoid crash. Check TJA and re-run." ) + continue # If a drumroll spans a single measure, then add the # difference between start/end position if not current_drumroll.multimeasure: