Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrap pitch access in try/catch #1652

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
wrap pitch access in try/catch
  • Loading branch information
jhansen317 committed Oct 2, 2023
commit 3e412609093374ef2ce9d26a9724b2ef6d1b0ca7
7 changes: 5 additions & 2 deletions music21/tree/verticality.py
Original file line number Diff line number Diff line change
@@ -814,8 +814,11 @@ def conditionalAdd(ts, n: note.Note) -> None:
from music21 import stream

nonlocal pitchBust # love Py3!!!
p = n.pitch
pitchKey = p.nameWithOctave
try:
p = n.pitch
pitchKey = p.nameWithOctave
except AttributeError:
return

pitchGroup = None
if addPartIdAsGroup: