question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DTW test/error/ resampy.filters.get_filter

See original GitHub issue

I’m getting an error, it may be related to my environment, however this case appears to indicate get_filter is not returning the expected arguments

---> 23 BW_BEST = resampy.filters.get_filter('kaiser_best')[2]
IndexError: tuple index out of range
import librosa
D, wp = librosa.dtw(x, y, subseq=True)
print(d)



---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-5-af09122d8261> in <module>()
----> 1 import librosa
      2 D, wp = librosa.dtw(x, y, subseq=True)
      3 print(d)

C:\g\test\lib\librosa\__init__.py in <module>()
     10 # And all the librosa sub-modules
     11 from . import cache
---> 12 from . import core
     13 from . import beat
     14 from . import decompose

C:\g\test\lib\librosa\core\__init__.py in <module>()
    107 
    108 from .time_frequency import *  # pylint: disable=wildcard-import
--> 109 from .audio import *  # pylint: disable=wildcard-import
    110 from .spectrum import *  # pylint: disable=wildcard-import
    111 from .pitch import *  # pylint: disable=wildcard-import

C:\g\test\lib\librosa\core\audio.py in <module>()
     21 
     22 # Resampling bandwidths as percentage of Nyquist
---> 23 BW_BEST = resampy.filters.get_filter('kaiser_best')[2]
     24 BW_FASTEST = resampy.filters.get_filter('kaiser_fast')[2]
     25 

IndexError: tuple index out of range

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
apiszczcommented, Aug 13, 2017

y=np.random.randint(0,255,(1024,1)) rosadisp.specshow(librosa.stft(y), y_axis=‘linear’)

Two problems here, #1 integer not float, #2 and passed through resampy

Possibly a dimension check at core/audio.py here may warn the user and exit/error out. BW_BEST = resampy.filters.get_filter(‘kaiser_best’)[2] BW_FASTEST = resampy.filters.get_filter(‘kaiser_fast’)[2]

On Sun, Aug 13, 2017 at 3:12 PM, Brian McFee notifications@github.com wrote:

It was my error on the input format of the sound signal/array, all set.

Glad to hear! This does seem like a failing of our exception handling / input checking though. Would you mind providing a minimal (self-contained) example that triggers the above behavior so we can detect it going forward and provide a more useful error message?

scikit-learn is typically sklearn on windows

Yes, but we report package names to match their pypi name, not the python package name.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/librosa/librosa/issues/611#issuecomment-322061077, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXVTfaVduyDT4RAKj8uCHjk-Wzu8M7Cks5sX0qtgaJpZM4O1nl2 .

0reactions
bmcfeecommented, Aug 13, 2017

Thanks! I’ll stick that on the todo list.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found