From 200548ffe7699be565eca63bc85538a1881db4c4 Mon Sep 17 00:00:00 2001 From: leleogere Date: Thu, 13 Feb 2025 16:43:23 +0100 Subject: [PATCH] Fix a bug when actual/normal_dots was None --- partitura/score.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/partitura/score.py b/partitura/score.py index 6789ad0f..2a2fe696 100644 --- a/partitura/score.py +++ b/partitura/score.py @@ -2510,10 +2510,12 @@ def __str__(self): if self.normal_type is None else "normal_type={}".format(self.normal_type) ) - for _ in range(self.actual_dots): - t_actual += "." - for _ in range(self.normal_dots): - t_normal += "." + if self.actual_dots: + for _ in range(self.actual_dots): + t_actual += "." + if self.normal_dots: + for _ in range(self.normal_dots): + t_normal += "." start = "" if self.start_note is None else "start={}".format(self.start_note.id) end = "" if self.end_note is None else "end={}".format(self.end_note.id) return " ".join(