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

jinja2.exceptions.UndefinedError #80

Open
Z0pyrus opened this issue Aug 18, 2020 · 1 comment
Open

jinja2.exceptions.UndefinedError #80

Z0pyrus opened this issue Aug 18, 2020 · 1 comment

Comments

@Z0pyrus
Copy link

Z0pyrus commented Aug 18, 2020

After running the run.sh / the UI and after logging in, this happend:

Traceback (most recent call last):
  File "/home/user/.local/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/user/.local/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/home/user/.local/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/user/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/user/.local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/user/.local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/user/.local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/user/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/user/.local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/user/.local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/user/Desktop/SMD/smd/GUI/backend.py", line 34, in index
    return render_template(
  File "/home/user/.local/lib/python3.8/site-packages/flask/templating.py", line 137, in render_template
    return _render(
  File "/home/user/.local/lib/python3.8/site-packages/flask/templating.py", line 120, in _render
    rv = template.render(context)
  File "/usr/local/lib/python3.8/dist-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/dist-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/dist-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/home/user/Desktop/SMD/smd/GUI/templates/home.html", line 1, in top-level template code
    {% extends 'base.html' %}
  File "/home/user/Desktop/SMD/smd/GUI/templates/base.html", line 98, in top-level template code
    {% block body %}
  File "/home/user/Desktop/SMD/smd/GUI/templates/home.html", line 84, in block "body"
    <div class="image-shadow-conc-r" style="background-image:url({{user_top_tracks[0].alb_image}});"></div>
  File "/usr/local/lib/python3.8/dist-packages/jinja2/environment.py", line 471, in getattr
    return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: list object has no element 0
@imedjendoubi
Copy link

Same issue here

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