"Delete this thread" -> 'HTTP-500 -> NoneType' object has no attribute 'all'
Is deleting threads from the archive (via Hyperkitty) currently supported? I am getting the error indicated above if I click on "Delete this thread".
Is there another way to delete whole threads or individual posts?
Simon
On 05/28/2017 06:07 AM, Simon Liebold via Mailman-users wrote:
Is deleting threads from the archive (via Hyperkitty) currently supported? I am getting the error indicated above if I click on "Delete this thread".
I just tested this on another list on this server. and both 'delete message' and 'delete thread' worked for me with the latest release Hyperkitty 1.1.0, django_mailman3 1.1.0 and Django-1.10.7.
Did you get to the confirmation page and then get the 500 or did the 500 come before getting the confirmation page? Is there a full traceback in mailman_web.log?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Am 28.05.2017 um 21:16 schrieb Mark Sapiro:
I just tested this on another list on this server. and both 'delete message' and 'delete thread' worked for me with the latest release Hyperkitty 1.1.0, django_mailman3 1.1.0 and Django-1.10.7.
Did you get to the confirmation page and then get the 500 or did the 500 come before getting the confirmation page? Is there a full traceback in mailman_web.log?
I didn't find a 'delete message' button. But "Delete this thread" went straight to the 500. Both, Hyperkitty and django-mailman are up-to-date with master.
ERROR 2017-05-28 13:04:14,496 29835 django.request Internal Server Error: /hyperkitty/list/simsimmer@lists.simonliebold.de/thread/4I2TRZTFXMMH2XRQAS73IAEIYROFE5YM/delete Traceback (most recent call last): File "/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/core/handlers/base.py", line 249, in _legacy_get_response response = self._get_response(request) File "/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/contrib/auth/decorators.py", line 23, in _wrapped_view return view_func(request, *args, **kwargs) File "/opt/mailman/hyperkitty/hyperkitty/lib/view_helpers.py", line 141, in inner return func(request, *args, **kwargs) File "/opt/mailman/hyperkitty/hyperkitty/views/message.py", line 306, in delete form = MessageDeleteForm(initial={"email": initial}) File "/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/forms/forms.py", line 96, in __init__ self.fields = copy.deepcopy(self.base_fields) File "/usr/lib/python2.7/copy.py", line 190, in deepcopy y = _reconstruct(x, rv, 1, memo) File "/usr/lib/python2.7/copy.py", line 328, in _reconstruct args = deepcopy(args, memo) File "/usr/lib/python2.7/copy.py", line 163, in deepcopy y = copier(x, memo) File "/usr/lib/python2.7/copy.py", line 237, in _deepcopy_tuple y.append(deepcopy(a, memo)) File "/usr/lib/python2.7/copy.py", line 163, in deepcopy y = copier(x, memo) File "/usr/lib/python2.7/copy.py", line 230, in _deepcopy_list y.append(deepcopy(a, memo)) File "/usr/lib/python2.7/copy.py", line 163, in deepcopy y = copier(x, memo) File "/usr/lib/python2.7/copy.py", line 230, in _deepcopy_list y.append(deepcopy(a, memo)) File "/usr/lib/python2.7/copy.py", line 174, in deepcopy y = copier(memo) File "/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/forms/models.py", line 1168, in __deepcopy__ result.queryset = self.queryset.all() AttributeError: 'NoneType' object has no attribute 'all'
Simon
On 05/28/2017 12:40 PM, Simon Liebold via Mailman-users wrote:
I didn't find a 'delete message' button. But "Delete this thread" went straight to the 500. Both, Hyperkitty and django-mailman are up-to-date with master.
'Delete this message' is in the 'message' view. "Delete this thread" is in the 'thread' view.
ERROR 2017-05-28 13:04:14,496 29835 django.request Internal Server Error: /hyperkitty/list/simsimmer@lists.simonliebold.de/thread/4I2TRZTFXMMH2XRQAS73IAEIYROFE5YM/delete Traceback (most recent call last): File "/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/core/handlers/exception.py",
HyperKitty requires Django<1.11. The comment in the requirements in setup.py implies this is only a django-haystack requirement
"Django>=1.8",
# Don't upgrade to 1.11 until django-haystack supports it:
# https://github.com/django-haystack/django-haystack/pull/1499
"Django<1.11",
but since it works for me with Django 1.10, you might want to try that.
...
File "/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/forms/models.py", line 1168, in __deepcopy__ result.queryset = self.queryset.all() AttributeError: 'NoneType' object has no attribute 'all'
In particular, this looks like Django 1.11 bug <https://code.djangoproject.com/ticket/27975>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Am 28.05.2017 um 22:24 schrieb Mark Sapiro:
'Delete this message' is in the 'message' view. "Delete this thread" is in the 'thread' view.
Now found the message view. Thanks.
HyperKitty requires Django<1.11. The comment in the requirements in setup.py implies this is only a django-haystack requirement
"Django>=1.8", # Don't upgrade to 1.11 until django-haystack supports it: # https://github.com/django-haystack/django-haystack/pull/1499 "Django<1.11",
but since it works for me with Django 1.10, you might want to try that.
OK, I was still running an RC version. Silly me.
In particular, this looks like Django 1.11 bug <https://code.djangoproject.com/ticket/27975>.
Which was closed in the release version that I initially upgraded to (1.11.1).
Now, I get to see the confirmation view and upon confirming I see these (luckily different) errors like below (same with Django 1.10):
Could not delete message P2GJLK4JPDU2K6ZKBSDUWASF2TVHCJTT: (1146, "Table 'mailmansuite.django_q_ormq' doesn't exist") Could not delete message 4I2TRZTFXMMH2XRQAS73IAEIYROFE5YM: (1146, "Table 'mailmansuite.django_q_ormq' doesn't exist")
True, this table doesn't exist in the database. It isn't created by python manage.py migrate.
The error is served with HTTP-200. No stack trace in mailmansuite.log.
Headscratching: Simon
On 05/29/2017 02:16 PM, Simon Liebold via Mailman-users wrote:
Now, I get to see the confirmation view and upon confirming I see these (luckily different) errors like below (same with Django 1.10):
Could not delete message P2GJLK4JPDU2K6ZKBSDUWASF2TVHCJTT: (1146, "Table 'mailmansuite.django_q_ormq' doesn't exist") Could not delete message 4I2TRZTFXMMH2XRQAS73IAEIYROFE5YM: (1146, "Table 'mailmansuite.django_q_ormq' doesn't exist")
True, this table doesn't exist in the database. It isn't created by python manage.py migrate.
The error is served with HTTP-200. No stack trace in mailmansuite.log.
Do you have django_q in INSTALLED_APPLICATIONS in your Django config and do you have
# # Asynchronous tasks # Q_CLUSTER = { 'timeout': 300, 'save_limit': 100, 'orm': 'default', }
in your Django config and are you running
django-admin qcluster
at startup?
See <https://mail.python.org/pipermail/mailman-developers/2017-May/026064.html>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Am 30.05.2017 um 02:06 schrieb Mark Sapiro:
Do you have django_q in INSTALLED_APPLICATIONS in your Django config and do you have
# # Asynchronous tasks # Q_CLUSTER = { 'timeout': 300, 'save_limit': 100, 'orm': 'default', }
in your Django config and are you running
django-admin qcluster
at startup?
See <https://mail.python.org/pipermail/mailman-developers/2017-May/026064.html>.
Thanks Mark. After adding django_q, running python manage.py migrate and starting the runners it now works nicely:
Successfully deleted 2 messages.
Simon
Excerpts from Simon Liebold via Mailman-users's message of May 29, 2017 2:16 pm:
Am 28.05.2017 um 22:24 schrieb Mark Sapiro:
'Delete this message' is in the 'message' view. "Delete this thread" is in the 'thread' view.
Now found the message view. Thanks.
HyperKitty requires Django<1.11. The comment in the requirements in setup.py implies this is only a django-haystack requirement
"Django>=1.8", # Don't upgrade to 1.11 until django-haystack supports it: # https://github.com/django-haystack/django-haystack/pull/1499 "Django<1.11",
but since it works for me with Django 1.10, you might want to try that.
OK, I was still running an RC version. Silly me.
In particular, this looks like Django 1.11 bug <https://code.djangoproject.com/ticket/27975>.
Which was closed in the release version that I initially upgraded to (1.11.1).
Now, I get to see the confirmation view and upon confirming I see these (luckily different) errors like below (same with Django 1.10):
Could not delete message P2GJLK4JPDU2K6ZKBSDUWASF2TVHCJTT: (1146, "Table 'mailmansuite.django_q_ormq' doesn't exist") Could not delete message 4I2TRZTFXMMH2XRQAS73IAEIYROFE5YM: (1146, "Table 'mailmansuite.django_q_ormq' doesn't exist")
You may have to do python manage.py makemigrations
after adding a new
INSTALLED_APPLICATIONS and before running python manage.py migrate
Hope that helps!
-- thanks, Abhilash Raj
participants (3)
-
Abhilash Raj
-
Mark Sapiro
-
Simon Liebold