vipul-sharma20/tayuya

UnboundLocalError: local variable 'note_info' referenced before assignment

sugizo opened this issue · 0 comments

sugizo commented

environment
google colab

steps

pip install -U tayuya
from tayuya import MIDIParser, Tabs
mid = MIDIParser('sample.mid', track = 0)
mid.render_tabs()

result

UnboundLocalError                         Traceback (most recent call last)
[<ipython-input-42-59341503e691>](https://localhost:8080/#) in <cell line: 1>()
----> 1 mid.render_tabs()

2 frames
[/usr/local/lib/python3.10/dist-packages/tayuya/tabs.py](https://localhost:8080/#) in note_nearest_to_fret(self, fret, note, scale_notes)
     56         min_fret = min_string = min_diff = 999
     57 
---> 58         for note_string, note_fret in note_info.items():
     59             if not note_fret:
     60                 continue

UnboundLocalError: local variable 'note_info' referenced before assignment

best regards