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

IndexError when navigating to a track or album #374

Open
retrodaredevil opened this issue Aug 26, 2024 · 1 comment
Open

IndexError when navigating to a track or album #374

retrodaredevil opened this issue Aug 26, 2024 · 1 comment

Comments

@retrodaredevil
Copy link

I just set up maloja today in docker. I imported scrobbles from last fm, and I currently do not have any API keys set up. Navigating to artists works just fine, but when navigating to a track or album, I get these errors:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/bottle.py", line 876, in _handle
    return route.call(**args)
  File "/usr/lib/python3.10/site-packages/bottle.py", line 1759, in wrapper
    rv = callback(*a, **ka)
  File "/usr/lib/python3.10/site-packages/maloja/server.py", line 231, in jinja_page_public
    return jinja_page(name)
  File "/usr/lib/python3.10/site-packages/maloja/dev/profiler.py", line 42, in newfunc
    result = func(*args,**kwargs)
  File "/usr/lib/python3.10/site-packages/maloja/server.py", line 214, in jinja_page
    res = template.render(**loc_context)
  File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/usr/lib/python3.10/site-packages/maloja/web/jinja/track.jinja", line 21, in top-level template code
    {% set info = dbc.track_info({'track':track}) %}
  File "/usr/lib/python3.10/site-packages/maloja/database/jinjaview.py", line 47, in packedmethod
    result = originalmethod(**kwargs,dbconn=self.conn)
  File "/usr/lib/python3.10/site-packages/maloja/database/__init__.py", line 65, in newfunc
    return func(*args,**kwargs)
  File "/usr/lib/python3.10/site-packages/maloja/database/__init__.py", line 727, in track_info
    c = [e for e in alltimecharts if e["track_id"] == track_id][0]
IndexError: list index out of range
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/bottle.py", line 876, in _handle
    return route.call(**args)
  File "/usr/lib/python3.10/site-packages/bottle.py", line 1759, in wrapper
    rv = callback(*a, **ka)
  File "/usr/lib/python3.10/site-packages/maloja/server.py", line 231, in jinja_page_public
    return jinja_page(name)
  File "/usr/lib/python3.10/site-packages/maloja/dev/profiler.py", line 42, in newfunc
    result = func(*args,**kwargs)
  File "/usr/lib/python3.10/site-packages/maloja/server.py", line 214, in jinja_page
    res = template.render(**loc_context)
  File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/usr/lib/python3.10/site-packages/maloja/web/jinja/album.jinja", line 11, in top-level template code
    {% set info = dbc.album_info({'album':album}) %}
  File "/usr/lib/python3.10/site-packages/maloja/database/jinjaview.py", line 47, in packedmethod
    result = originalmethod(**kwargs,dbconn=self.conn)
  File "/usr/lib/python3.10/site-packages/maloja/database/__init__.py", line 65, in newfunc
    return func(*args,**kwargs)
  File "/usr/lib/python3.10/site-packages/maloja/database/__init__.py", line 785, in album_info
    c = [e for e in alltimecharts if e["album"] == album][0]
IndexError: list index out of range

Maloja v3.2.2 running in docker.

My knowledge of Maloja is limited, as I've only had it running for about an hour, but I think that whatever is causing this error at least needs a better error message of what's going wrong.

@GioF71
Copy link

GioF71 commented Aug 26, 2024

Hello, the same is happening to me as well!
EDIT: does not happen anymore. Maybe because importing from MultiScrobbler has finished in the meantime

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