Hey there—I’m getting an error when I call Score.show()
or Score.show_xml()
in a SCAMP project I’m currently working on:
Traceback (most recent call last):
File “/Users/aes/Documents/Workspace/GitHub/duo-axis/sequence.py”, line 92, in
score.show()
File “/Users/aes/.virtualenvs/comp/lib/python3.9/site-packages/scamp/score.py”, line 719, in show
abjad().show(self.to_abjad(wrap_as_file=True, non_score_blocks=non_score_blocks, **lilypond_file_args))
File “/Users/aes/.virtualenvs/comp/lib/python3.9/site-packages/scamp/score.py”, line 1274, in to_abjad
return ScoreComponent.to_abjad(self, wrap_as_file=wrap_as_file, non_score_blocks=non_score_blocks,
File “/Users/aes/.virtualenvs/comp/lib/python3.9/site-packages/scamp/score.py”, line 565, in to_abjad
return self._to_abjad_lilypond_file(non_score_blocks=non_score_blocks, **lilypond_file_args)
File “/Users/aes/.virtualenvs/comp/lib/python3.9/site-packages/scamp/score.py”, line 597, in _to_abjad_lilypond_file
abjad_object = self._to_abjad()
File “/Users/aes/.virtualenvs/comp/lib/python3.9/site-packages/scamp/score.py”, line 1044, in _to_abjad
key_points, guide_marks = self._get_tempo_key_points_and_guide_marks()
File “/Users/aes/.virtualenvs/comp/lib/python3.9/site-packages/scamp/score.py”, line 1002, in _get_tempo_key_points_and_guide_marks
score_length = self.length()
File “/Users/aes/.virtualenvs/comp/lib/python3.9/site-packages/scamp/score.py”, line 876, in length
return max(staff.length() for staff in self.staves)
File “/Users/aes/.virtualenvs/comp/lib/python3.9/site-packages/scamp/score.py”, line 876, in
return max(staff.length() for staff in self.staves)
File “/Users/aes/.virtualenvs/comp/lib/python3.9/site-packages/scamp/score.py”, line 1629, in length
return sum(m.length for m in self.measures[:-1]) + self.measures[-1].non_empty_length()
File “/Users/aes/.virtualenvs/comp/lib/python3.9/site-packages/scamp/score.py”, line 1722, in non_empty_length
return max(v.non_empty_length() for v in self.voices)
File “/Users/aes/.virtualenvs/comp/lib/python3.9/site-packages/scamp/score.py”, line 1722, in
return max(v.non_empty_length() for v in self.voices)
AttributeError: ‘NoneType’ object has no attribute ‘non_empty_length’
I’ve been trying to chase down the change I made to my code which would have caused this but haven’t had any luck yet… just thought I’d ask if this rings any bells and a certain type of behavior is likely to be the culprit? Thanks!