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

warnings.warning() does not exist #45

Open
jeswan opened this issue Apr 21, 2022 · 1 comment
Open

warnings.warning() does not exist #45

jeswan opened this issue Apr 21, 2022 · 1 comment

Comments

@jeswan
Copy link

jeswan commented Apr 21, 2022

Bug Description:
When using stempeg as part of musdb, I encountered the following error:

        stem_durations = np.array([t.shape[0] for t in stems])
        if not (stem_durations == stem_durations[0]).all():
>           warnings.warning("Stems differ in length and were shortend")
E           AttributeError: module 'warnings' has no attribute 'warning'

/usr/local/lib/python3.9/site-packages/stempeg/read.py:299: AttributeError

warning() does not exist after checking the warnings package.

Suggested Solution:
warnings.warning() -> warnings.warn() since warn() exists.

@faroit
Copy link
Owner

faroit commented Apr 21, 2022

oops. good catch. can fix that next week - you can also provide a PR if you like

naba89 added a commit to naba89/stempeg that referenced this issue Jan 15, 2023
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