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

Event pages failing to load due to missing bracket information #5806

Open
ZachOrr opened this issue Mar 17, 2024 · 1 comment
Open

Event pages failing to load due to missing bracket information #5806

ZachOrr opened this issue Mar 17, 2024 · 1 comment

Comments

@ZachOrr
Copy link
Member

ZachOrr commented Mar 17, 2024

Report of https://www.thebluealliance.com/event/2024marea failing to load during the event. Was able to repro locally and the issue looks related to missing bracket information

ERROR    2024-03-17 19:30:25,259 /tmp/tmpw3ekrnkh/lib/python3.12/site-packages/flask/app.py:828] backend.web.main: Exception on /event/2024marea [GET]
Traceback (most recent call last):
  File "/tmp/tmpw3ekrnkh/lib/python3.12/site-packages/flask/app.py", line 1463, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/tmpw3ekrnkh/lib/python3.12/site-packages/flask/app.py", line 872, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/tmpw3ekrnkh/lib/python3.12/site-packages/flask/app.py", line 870, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/tmpw3ekrnkh/lib/python3.12/site-packages/flask/app.py", line 855, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tba/src/backend/common/decorators.py", line 33, in decorated_function
    resp = make_response(func(*args, **kwargs))
                         ^^^^^^^^^^^^^^^^^^^^^
  File "/tba/src/backend/web/handlers/event.py", line 283, in event_detail
    render_template("event_details.html", template_values),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tba/src/backend/web/profiled_render.py", line 8, in render_template
    return flask_render_template(template, **template_values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/tmpw3ekrnkh/lib/python3.12/site-packages/flask/templating.py", line 150, in render_template
    return _render(app, template, context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/tmpw3ekrnkh/lib/python3.12/site-packages/flask/templating.py", line 131, in _render
    rv = template.render(context)
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/tmpw3ekrnkh/lib/python3.12/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/tmp/tmpw3ekrnkh/lib/python3.12/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/tba/src/backend/web/templates/event_details.html", line 3, in top-level template code
    {% import 'event_partials/event_macros.html' as em %}
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tba/src/backend/web/templates/base.html", line 105, in top-level template code
    {% block content %}
  File "/tba/src/backend/web/templates/event_details.html", line 222, in block 'content'
    {% include "bracket_partials/double_elim_bracket_table.html" %}
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tba/src/backend/web/templates/bracket_partials/double_elim_bracket_table.html", line 146, in top-level template code
    {{ bracket_match('Finals', bracket_table.f.get('f1'), 'Winner of M11', 'Winner of M13') }}
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/tmpw3ekrnkh/lib/python3.12/site-packages/jinja2/environment.py", line 485, in getattr
    return getattr(obj, attribute)
           ^^^^^^^^^^^^^^^^^^^^^^^
jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'f'
@ZachOrr
Copy link
Member Author

ZachOrr commented Mar 17, 2024

Temp fix at 28ac20d

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