magfest-archive / mivs

MAGFest Indie Videogame Showcase
GNU Affero General Public License v3.0
2 stars 2 forks source link

ERRORS in production #101

Closed RobRuana closed 6 years ago

RobRuana commented 6 years ago

Two errors...

Accessing /uber/mivs_judging/video_review:

   Traceback (most recent call last):
      File "/usr/local/uber/env/lib/python3.4/site-packages/cherrypy/_cprequest.py", line 670, in respond
        response.body = self.handler()
      File "/usr/local/uber/env/lib/python3.4/site-packages/cherrypy/lib/encoding.py", line 221, in __call__
        self.body = self.oldhandler(*args, **kwargs)
      File "/usr/local/uber/env/lib/python3.4/site-packages/cherrypy/_cpdispatch.py", line 60, in __call__
        return self.callable(*self.args, **self.kwargs)
      File "/usr/local/uber/plugins/uber/uber/decorators.py", line 252, in with_timing
        return func(*args, **kwargs)
      File "/usr/local/uber/plugins/uber/uber/decorators.py", line 267, in with_session
        retval = func(*args, session=session, **kwargs)
      File "/usr/local/uber/plugins/uber/uber/decorators.py", line 388, in with_restrictions
        return func(*args, **kwargs)
      File "/usr/local/uber/plugins/uber/uber/decorators.py", line 353, in with_rendering
        return render(_get_template_filename(func), result)
      File "/usr/local/uber/plugins/uber/uber/decorators.py", line 288, in render
        rendered = template.render(data)
      File "/usr/local/uber/env/lib/python3.4/site-packages/jinja2/environment.py", line 1008, in render
        return self.environment.handle_exception(exc_info, True)
      File "/usr/local/uber/env/lib/python3.4/site-packages/jinja2/environment.py", line 780, in handle_exception
        reraise(exc_type, exc_value, tb)
      File "/usr/local/uber/env/lib/python3.4/site-packages/jinja2/_compat.py", line 37, in reraise
        raise value.with_traceback(tb)
      File "/usr/local/uber/plugins/mivs/mivs/templates/mivs_judging/video_review.html", line 1, in top-level template code
        {% extends "mivs_base.html" %}
      File "/usr/local/uber/plugins/mivs/mivs/templates/mivs_base.html", line 1, in top-level template code
        {% extends "preregistration/preregbase.html" %}
      File "/usr/local/uber/plugins/uber/uber/templates/preregistration/preregbase.html", line 1, in top-level template code
        {% extends "base.html" %}
      File "/usr/local/uber/plugins/uber/uber/templates/base.html", line 285, in top-level template code
        {% block content %}{% endblock %}
      File "/usr/local/uber/plugins/mivs/mivs/templates/mivs_base.html", line 52, in block "content"
        {% block body %}{% endblock %}
      File "/usr/local/uber/plugins/mivs/mivs/templates/mivs_judging/video_review.html", line 23, in block "body"
        <a href="studio?id={{ review.game.studio.id }}">{{ review.game.studio.name }}</a>
      File "/usr/local/uber/env/lib/python3.4/site-packages/jinja2/environment.py", line 430, in getattr
        return getattr(obj, attribute)
    jinja2.exceptions.UndefinedError: 'None' has no attribute 'studio'

Accessing /uber/mivs_applications/game?id=XXX:

Traceback (most recent call last):
      File "/usr/local/uber/plugins/uber/uber/decorators.py", line 328, in with_rendering
        result = func(*args, **kwargs)
      File "/usr/local/uber/plugins/mivs/mivs/site_sections/mivs_applications.py", line 58, in game
        game = session.indie_game(params, checkgroups=['genres', 'platforms'], bools=['agreed_liability', 'agreed_showtimes'], applicant=True)
      File "/usr/local/uber/plugins/mivs/mivs/models.py", line 360, in with_applicant
        assert instance.is_new or studio == instance.studio
    AssertionError
RobRuana commented 6 years ago

Ok, for the second error (assert instance.is_new or studio == instance.studio) that happens when you are logged in as one studio, and try to click on another studio's game.

To prevent that the user needs to log out of the studio first by clicking on the "log out" link at the top of this page: https://prime.uber.magfest.org/uber/mivs_applications/index

Not ideal, but also not exactly a bug šŸ™

RobRuana commented 6 years ago

Ok, for the first error (jinja2.exceptions.UndefinedError: 'None' has no attribute 'studio') that happens when you do a GET on /uber/mivs_judging/video_review without providing an id param.

Not ideal, but also not exactly a bug šŸ™