Hyperkitty: AttributeError: 'NoneType' object has no attribute 'subject'
I'm getting a 500 server error with some threads in hyperkitty, e.g. this one: https://we.lurk.org/hyperkitty/list/tidal@we.lurk.org/thread/3IN5NFFFPVAQSRK...
The following appears in the log, any pointers much appreciated!
ERROR 2018-01-13 12:29:53,855 6056 django.request Internal Server Error: /hyperkitty/list/tidal@we.lurk.org/thread/4ECEUJRXMJ2U7EPKRMU6V6A3FVL523BC/ Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 249, in _legacy_get_response response = self._get_response(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/lib/view_helpers.py", line 136, in inner return func(request, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/views/thread.py", line 193, in thread_index return render(request, "hyperkitty/thread.html", context) File "/usr/local/lib/python2.7/dist-packages/django/shortcuts.py", line 30, in render content = loader.render_to_string(template_name, context, request, using=using) File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 68, in render_to_string return template.render(context, request) File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py", line 66, in render return self.template.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 207, in render return self._render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 199, in _render return self.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", line 177, in render return compiled_parent._render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 199, in _render return self.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", line 72, in render result = block.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py", line 529, in render return self.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py", line 322, in render return nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 1040, in render output = self.filter_expression.resolve(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 708, in resolve obj = self.var.resolve(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 849, in resolve value = self._resolve_lookup(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 890, in _resolve_lookup current = getattr(current, bit) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/thread.py", line 108, in subject return self.cached_values"subject" File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/common.py", line 61, in __call__ return self.get_or_set(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/common.py", line 57, in get_or_set value = self.rebuild(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/common.py", line 49, in rebuild value = self.get_value(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/thread.py", line 223, in get_value return self.instance.starting_email.subject AttributeError: 'NoneType' object has no attribute 'subject' ERROR 2018-01-13 12:29:53,855 6056 django.request Internal Server Error: /hyperkitty/list/tidal@we.lurk.org/thread/4ECEUJRXMJ2U7EPKRMU6V6A3FVL523BC/ Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 249, in _legacy_get_response response = self._get_response(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/lib/view_helpers.py", line 136, in inner return func(request, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/views/thread.py", line 193, in thread_index return render(request, "hyperkitty/thread.html", context) File "/usr/local/lib/python2.7/dist-packages/django/shortcuts.py", line 30, in render content = loader.render_to_string(template_name, context, request, using=using) File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 68, in render_to_string return template.render(context, request) File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py", line 66, in render return self.template.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 207, in render return self._render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 199, in _render return self.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", line 177, in render return compiled_parent._render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 199, in _render return self.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", line 72, in render result = block.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py", line 529, in render return self.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py", line 322, in render return nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 1040, in render output = self.filter_expression.resolve(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 708, in resolve obj = self.var.resolve(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 849, in resolve value = self._resolve_lookup(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 890, in _resolve_lookup current = getattr(current, bit) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/thread.py", line 108, in subject return self.cached_values"subject" File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/common.py", line 61, in __call__ return self.get_or_set(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/common.py", line 57, in get_or_set value = self.rebuild(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/common.py", line 49, in rebuild value = self.get_value(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/thread.py", line 223, in get_value return self.instance.starting_email.subject AttributeError: 'NoneType' object has no attribute 'subject'
On 01/13/2018 09:46 AM, Alex McLean wrote:
I'm getting a 500 server error with some threads in hyperkitty, e.g. this one: https://we.lurk.org/hyperkitty/list/tidal@we.lurk.org/thread/3IN5NFFFPVAQSRK...
The following appears in the log, any pointers much appreciated!
ERROR 2018-01-13 12:29:53,855 6056 django.request Internal Server Error: /hyperkitty/list/tidal@we.lurk.org/thread/4ECEUJRXMJ2U7EPKRMU6V6A3FVL523BC/ Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 249, in _legacy_get_response response = self._get_response(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/lib/view_helpers.py", line 136, in inner return func(request, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/views/thread.py", line 193, in thread_index return render(request, "hyperkitty/thread.html", context) File "/usr/local/lib/python2.7/dist-packages/django/shortcuts.py", line 30, in render content = loader.render_to_string(template_name, context, request, using=using) File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 68, in render_to_string return template.render(context, request) File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py", line 66, in render return self.template.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 207, in render return self._render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 199, in _render return self.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", line 177, in render return compiled_parent._render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 199, in _render return self.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", line 72, in render result = block.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py", line 529, in render return self.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py", line 322, in render return nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 990, in render bit = node.render_annotated(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated return self.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 1040, in render output = self.filter_expression.resolve(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 708, in resolve obj = self.var.resolve(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 849, in resolve value = self._resolve_lookup(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 890, in _resolve_lookup current = getattr(current, bit) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/thread.py", line 108, in subject return self.cached_values"subject" File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/common.py", line 61, in __call__ return self.get_or_set(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/common.py", line 57, in get_or_set value = self.rebuild(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/common.py", line 49, in rebuild value = self.get_value(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/hyperkitty/models/thread.py", line 223, in get_value return self.instance.starting_email.subject AttributeError: 'NoneType' object has no attribute 'subject'
This may be related to our not clearing cache when deleting messages/threads. See <https://gitlab.com/mailman/hyperkitty/issues/160>. If so, restarting your web server may help.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
This may be related to our not clearing cache when deleting messages/threads. See <https://gitlab.com/mailman/hyperkitty/issues/160>;. If so, restarting your web server may help.
I tried restarting uwsgi but no dice. It's only affecting particular threads and I don't know of any threads being deleted so I think it's probably a different issue.
Best wishes
alex
I spotted a row in the hyperkitty_thread table that had a NULL starting_email_id, and no emails pointing at it. Deleting this row seems to have fixed things.
participants (2)
-
Alex McLean
-
Mark Sapiro