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

error when running make_test_train with --chordwise #5

Open
antoniomechas opened this issue Jan 22, 2020 · 0 comments
Open

error when running make_test_train with --chordwise #5

antoniomechas opened this issue Jan 22, 2020 · 0 comments

Comments

@antoniomechas
Copy link

Hello,
When running "python make_test_train.py --chordwise I get the following error:

python make_test_train.py --chordwise
data/composers/chordwise/piano_solo/note_range62/sample_freq4
data/composers/chordwise/piano_solo/note_range62/sample_freq4/mozart-maestro
Chordwise encoding: removing duration marks and expanding rests
Traceback (most recent call last):
  File "make_test_train.py", line 216, in <module>
    main(SOURCE, TARGET_TRAIN, TARGET_TEST, composer, args.tt_split, args.chordwise, args.sample, args.no_wait)
  File "make_test_train.py", line 161, in main
    remove_duration(TARGET_TRAIN)
  File "make_test_train.py", line 50, in remove_duration
    for file in tdqm(os.listdir(DIR)):
NameError: name 'tdqm' is not defined

I replaced the "tdqm" by "tqdm".

Then I got the error:

data/composers/chordwise/piano_solo/note_range62/sample_freq4
data/composers/chordwise/piano_solo/note_range62/sample_freq4/mozart-maestro
Chordwise encoding: removing duration marks and expanding rests
  0%|                                                                                                  | 0/34 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "make_test_train.py", line 216, in <module>
    main(SOURCE, TARGET_TRAIN, TARGET_TEST, composer, args.tt_split, args.chordwise, args.sample, args.no_wait)
  File "make_test_train.py", line 161, in main
    remove_duration(TARGET_TRAIN)
  File "make_test_train.py", line 59, in remove_duration
    f.write(" ".join(temp[i*piece_len:(i+1)*piece_len]))
NameError: name 'piece_len' is not defined

I added the line:
piece_len=len(temp)//12
just before the for in line 56.

Then it worked fine... hope those modifications are right.
Antonio.

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