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

UnboundLocalError: local variable 'note_info' referenced before assignment #3

Open
sugizo opened this issue Nov 23, 2023 · 0 comments

Comments

@sugizo
Copy link

sugizo commented Nov 23, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant