X-Git-Url: https://scm.cri.ensmp.fr/git/minwii.git/blobdiff_plain/46f3ffd7fdde386f41020171b5733e55a8e64a85..afbe8193381ac23fa68ea0c271f83655091c8981:/src/minwii/musicxml.py?ds=inline diff --git a/src/minwii/musicxml.py b/src/minwii/musicxml.py index 0ed7085..d7651b2 100755 --- a/src/minwii/musicxml.py +++ b/src/minwii/musicxml.py @@ -83,7 +83,13 @@ class Part(object) : previous.addDuration(note) continue else : - previous.addDuration(note) + try : + previous.addDuration(note) + except AttributeError : + # can occur if part starts with a rest. + if previous is not None : + # something else is wrong. + raise continue previous = note