magenta/note-seq

music_pb2 reference bug in sequences_lib.py

gmittal opened this issue · 1 comments

In sequences_lib.py, there's a bug which I think is related to aliasing of the music_pb2/protobuf module.

The following (line 815) fails when the time_change is a TimeSignature in the latest version of note_seq shipped in the magenta repo:

if isinstance(time_change, music_pb2.NoteSequence.TimeSignature)

music_pb2 is currently imported this way:

from note_seq.protobuf import music_pb2

Even though this is the case, the only way I was able to get this to work locally was by changing line 815 to the following:

if isinstance(time_change, note_seq.protobuf.music_pb2.NoteSequence.TimeSignature)

Does this problem still happen with the v0.0.1 release of note_seq and if you use NoteSequence and sequences_lib by importing note_seq instead of the magenta.music alias?