Hello,
i have a forum section which started returning an Internal Server error each time anyone tries to browse it. I made no changes to the code pulled from github.
2017-04-29 22:00:26,183 ERROR: Exception on /forum/8-coffee [GET] [in /usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask/app.py:1560]
Traceback (most recent call last):
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask_themes2/__init__.py", line 138, in render_theme_template
**context)
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask/templating.py", line 133, in render_template
return _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list),
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/jinja2/environment.py", line 869, in get_or_select_template
return self.get_template(template_name_or_list, parent, globals)
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/jinja2/environment.py", line 830, in get_template
return self._load_template(name, self.make_globals(globals))
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/jinja2/environment.py", line 804, in _load_template
template = self.loader.load(self, name, globals)
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/jinja2/loaders.py", line 113, in load
source, filename, uptodate = self.get_source(environment, name)
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask/templating.py", line 57, in get_source
return self._get_source_fast(environment, template)
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask/templating.py", line 85, in _get_source_fast
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: _themes/aurora/forum/forum.html
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask_allows/allows.py", line 98, in allower
return f(*args, **kwargs)
File "/usr/home/flask/flaskbb/flaskbb/forum/views.py", line 100, in view_forum
topics=topics, forumsread=forumsread,
File "/usr/home/flask/flaskbb/flaskbb/utils/helpers.py", line 71, in render_template
return render_theme_template(theme, template, **context)
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask_themes2/__init__.py", line 141, in render_theme_template
return render_template(template_name, **context)
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask/templating.py", line 134, in render_template
context, ctx.app)
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/flask/templating.py", line 116, in _render
rv = template.render(context)
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/home/flask/flaskbb/.venv/lib/python3.5/site-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "/usr/home/flask/flaskbb/flaskbb/templates/forum/forum.html", line 4, in top-level template code
{% extends theme("layout.html") %}
File "/usr/home/flask/flaskbb/flaskbb/templates/layout.html", line 167, in top-level template code
{% block content %}
File "/usr/home/flask/flaskbb/flaskbb/templates/forum/forum.html", line 70, in block "content"
{% if topic|topic_is_unread(topicread, current_user, forumsread) %}
File "/usr/home/flask/flaskbb/flaskbb/utils/helpers.py", line 265, in topic_is_unread
if topic.last_post.date_created < read_cutoff:
AttributeError: 'NoneType' object has no attribute 'date_created'
bug