1
0
mirror of synced 2024-11-23 21:20:56 +01:00

converters.py: Change missing BALLOON from error to warning

This commit is contained in:
Viv 2024-02-10 18:16:18 -05:00
parent b4416ba838
commit 79af17e4cc

View File

@ -335,9 +335,11 @@ def convert_tja_to_fumen(tja: TJACourse) -> FumenCourse:
elif note.note_type in ["Balloon", "Kusudama"]:
try:
note.hits = course_balloons.pop(0)
except IndexError as exc:
raise ValueError(f"Not enough values for 'BALLOON: "
f"{course_balloons}'") from exc
except IndexError:
warnings.warn(f"Not enough values for 'BALLOON:' "
f"({tja.balloon}). Using value=1 to "
f"avoid crashing. Check TJA and re-run.")
note.hits = 1
current_drumroll = note
# Track Don/Ka notes (to later compute header values)