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

ValueError: need more than 0 values to unpack #10

Open
urumo opened this issue Mar 12, 2017 · 1 comment
Open

ValueError: need more than 0 values to unpack #10

urumo opened this issue Mar 12, 2017 · 1 comment

Comments

@urumo
Copy link

urumo commented Mar 12, 2017

Traceback (most recent call last):
File "generator.py", line 193, in
main(sys.argv)
File "generator.py", line 188, in main
generate(data_fn, out_fn, N_epochs)
File "generator.py", line 107, in generate
chords, abstract_grammars = get_musical_data(data_fn)
File "/media/aram/Mordigan/How-to-Generate-Music-Demo-master/preprocess.py", line 130, in get_musical_data
measures, chords = __parse_midi(data_fn)
File "/media/aram/Mordigan/How-to-Generate-Music-Demo-master/preprocess.py", line 25, in __parse_midi
melody1, melody2 = melody_stream.getElementsByClass(stream.Voice)
ValueError: need more than 0 values to unpack

and what do I do now?

@Echo-Ji
Copy link

Echo-Ji commented Apr 10, 2017

ADVISE:
You can just use "try-except" to catch the exception and debug it.
code like:

    try:
        melody1, melody2 = melody_stream.getElementsByClass(stream.Voice)
    except:
        print line

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

2 participants