From ac3f6e0ad1b96243a208a3b217183ff7c9fb8c70 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 6 Jan 2007 14:58:21 +0100 Subject: [PATCH] Fix #222. Insert use measure number 0 if not a number. --- scripts/musicxml2ly.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 4240b3aaae..77fffc25fe 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -313,7 +313,12 @@ def musicxml_voice_to_lily_voice (voice): if isinstance (n, musicxml.Attributes): if n.is_first () and n._measure_position == Rational (0): - voice_builder.add_bar_check (int (n.get_parent ().number)) + try: + number = int (n.get_parent ().number) + except ValueError: + number = 0 + + voice_builder.add_bar_check (number) for a in musicxml_attributes_to_lily (n): voice_builder.add_music (a, Rational (0)) continue -- 2.39.5