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

TCNTempoDetector fails with IndexError: list index out of range #500

Closed
alastair opened this issue Jan 21, 2022 · 5 comments
Closed

TCNTempoDetector fails with IndexError: list index out of range #500

alastair opened this issue Jan 21, 2022 · 5 comments

Comments

@alastair
Copy link

Expected behaviour

I'm running the TCNTempoDetector from the latest git installed in a virtualenv.

The error occurs with both mp3 and wav input.

TempoDetector works as expected.

Actual behaviour

$ TCNTempoDetector single song.wav 
Traceback (most recent call last):
  File "/Users/alastair/code/env/bin/TCNTempoDetector", line 107, in <module>
    main()
  File "/Users/alastair/code/env/bin/TCNTempoDetector", line 103, in main
    args.func(processor, **vars(args))
  File "/Users/alastair/code/env/lib/python3.7/site-packages/madmom/processors.py", line 599, in process_single
    _process((processor, infile, outfile, kwargs))
  File "/Users/alastair/code/env/lib/python3.7/site-packages/madmom/processors.py", line 283, in _process
    return process_tuple[0](*process_tuple[1:-1], **process_tuple[-1])
  File "/Users/alastair/code/env/lib/python3.7/site-packages/madmom/processors.py", line 114, in __call__
    return self.process(*args, **kwargs)
  File "/Users/alastair/code/env/lib/python3.7/site-packages/madmom/processors.py", line 573, in process
    data = _process((self.in_processor, data, kwargs))
  File "/Users/alastair/code/env/lib/python3.7/site-packages/madmom/processors.py", line 283, in _process
    return process_tuple[0](*process_tuple[1:-1], **process_tuple[-1])
  File "/Users/alastair/code/env/lib/python3.7/site-packages/madmom/processors.py", line 114, in __call__
    return self.process(*args, **kwargs)
  File "/Users/alastair/code/env/lib/python3.7/site-packages/madmom/processors.py", line 418, in process
    data = _process((processor, data, kwargs))
  File "/Users/alastair/code/env/lib/python3.7/site-packages/madmom/processors.py", line 283, in _process
    return process_tuple[0](*process_tuple[1:-1], **process_tuple[-1])
  File "/Users/alastair/code/env/lib/python3.7/site-packages/madmom/processors.py", line 114, in __call__
    return self.process(*args, **kwargs)
  File "/Users/alastair/code/env/lib/python3.7/site-packages/madmom/processors.py", line 418, in process
    data = _process((processor, data, kwargs))
  File "/Users/alastair/code/env/lib/python3.7/site-packages/madmom/processors.py", line 285, in _process
    return process_tuple[0](*process_tuple[1:-1])
  File "/Users/alastair/code/env/lib/python3.7/site-packages/madmom/ml/nn/__init__.py", line 49, in average_predictions
    if isinstance(predictions[0], tuple):
IndexError: list index out of range

Information about installed software

Please provide some information about installed software.

0.17.dev0
1.21.5
1.7.3
@superbock
Copy link
Collaborator

The error message is misleading, I fixed it. It stems from no nn_files being available to be loaded. Please update the models submodule by running git submodule update, it should be fixed then.

@alastair
Copy link
Author

thanks for the quick comment! I installed this directly into the virtualenv with pip install git+https://github.com/CPJKU/madmom.git, so maybe pip doesn't init the submodules before it installs?

I did git submodule update, then ran pip install . with my venv activated. I see the files in the env:

$ ls env/lib/python3.7/site-packages/madmom/models/beats/2016
beats_lstm_1.pkl beats_lstm_2.pkl beats_lstm_3.pkl beats_lstm_4.pkl beats_lstm_5.pkl beats_lstm_6.pkl beats_lstm_7.pkl beats_lstm_8.pkl

However, I think it's looking for models.BEATS_TCN, right? and I see no 2019 directory in the beats models folder, only 2015 and 2016.

I have current git master checked out ( 3bc8334) and my submodules are

$ git submodule status
 7e3dc1b0cad499792767074d03c38b194b9b0a79 madmom/models (heads/master)

@alastair
Copy link
Author

I updated the submodule to master of @CPJUK/madmom_models, and updated setup.py to install the 2019 models and it works, thanks!

@superbock
Copy link
Collaborator

Can you please check which version of madmom/models you have? Please do a git status inside the before-mentioned directory to see if you're at commit 7e3dc1.

@superbock
Copy link
Collaborator

Great!

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