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

Regression bug for 0.4.0: IndexError: list index out of range #7

Open
Tracked by #9
4321ba opened this issue Nov 17, 2024 · 0 comments
Open
Tracked by #9

Regression bug for 0.4.0: IndexError: list index out of range #7

4321ba opened this issue Nov 17, 2024 · 0 comments

Comments

@4321ba
Copy link

4321ba commented Nov 17, 2024

Hello!
I'm using this program for my BSc thesis (I'm experimenting with an mp3 to nbs converter), and probably found a bug.

$ python3
Python 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from nbswave import render_audio
>>> render_audio("nbs/001_Luxury_of_the_Cease-Fire_Ragni.nbs", "wave/001_Luxury_of_the_Cease-Fire_Ragni.ogg", default_sound_path="../Sounds")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/balint/.local/lib/python3.10/site-packages/nbswave/main.py", line 261, in render_audio
    renderer.mix_song(
  File "/home/balint/.local/lib/python3.10/site-packages/nbswave/main.py", line 228, in mix_song
    return self._mix(
  File "/home/balint/.local/lib/python3.10/site-packages/nbswave/main.py", line 144, in _mix
    track_length = self.get_length(self._song.weighted_notes(), tempo_segments)
  File "/home/balint/.local/lib/python3.10/site-packages/nbswave/main.py", line 132, in get_length
    return max(get_note_end_time(note) for note in notes)
  File "/home/balint/.local/lib/python3.10/site-packages/nbswave/main.py", line 132, in <genexpr>
    return max(get_note_end_time(note) for note in notes)
  File "/home/balint/.local/lib/python3.10/site-packages/nbswave/main.py", line 121, in get_note_end_time
    note_start = tempo_segments[note.tick]
IndexError: list index out of range

I'm attaching the file.
The same procedure with the same setup works with 0.3.0, but it doesn't with 0.4.0.
Thanks a lot!
001_Luxury_of_the_Cease-Fire_Ragni.nbs.zip

@Bentroen Bentroen mentioned this issue Dec 21, 2024
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