Skip to content

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

Description

@4321ba

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions