Periodically getting KeyError File in Mailman 3

Hi Team,
I am able to successfully install and use the Mailman 3
product but even after the installation also while clicking on different links, I am getting KeyError related to File.
I tried to regenerate it but could not and not sure when it
happens, how frequently it happens, on clicking which link it happens.
Please help me to get rid of it.
-- Thanks & Regards, Shashi Kanth.K 9052671936

On 2/5/20 5:01 PM, Shashikanth Komandoor wrote:
It is very difficult to even guess at what may be causing this without at least knowing the URL the link goes to and seeing a traceback and other info, but KeyError related to File is typically an error in Django's attempt to log the original error, and is not the actual error.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thank you dear Mark.
I have attached the images of the KeyError related to File for some URLs
But it is not mandatory that these URLs should give all the time the KeyError. Most of the times, I see the proper pages of those URLs. And not only that not only these URLs are giving the FileError other different URLs are also giving the same error.
It is not becoming possible to identify what might be the Root Cause for this error. I am running this Mailman 3 currently in production. And it has become very urgent for me to resolve this issue. Please extend your cooperation on this issue.
On Thu, Feb 6, 2020 at 11:25 PM Mark Sapiro <mark@msapiro.net> wrote:
-- Thanks & Regards, Shashi Kanth.K 9052671936

On 2/23/20 10:29 PM, Shashikanth Komandoor wrote:
Thank you dear Mark.
I have attached the images of the KeyError related to File for some URLs
Do not do this. Just copy and paste the error messages.
Further, your photos only show the beginning of the error. The only thing visible is the Python Path which is the least interesting information. What we need to see is the exception and the traceback and things related specifically to that.
And please no photo's or screen shots. Just copy/paste the relevant info.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Hi Mark,
Sorry for not providing the proper information and putting you
trouble. And no more screen shots from my side now onwards.
The below is the exception and the traceback I have copied and
pasted:
*Environment:Request Method: GETRequest URL: http://localhost:8000/postorius/lists/msgteam-hyd.lsmgr.nic.in/ <http://localhost:8000/postorius/lists/msgteam-hyd.lsmgr.nic.in/>Django Version: 2.2.9Python Version: 3.6.8Installed Applications:('hyperkitty', 'postorius', 'django_mailman3', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'django_gravatar', 'compressor', 'haystack', 'django_extensions', 'django_q', 'allauth', 'allauth.account', 'allauth.socialaccount')Installed Middleware:('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django_mailman3.middleware.TimezoneMiddleware', 'postorius.middleware.PostoriusMiddleware')Traceback:File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/core/handlers/exception.py" in inner 34. response = get_response(request)File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/core/handlers/base.py" in _get_response 115. response = self.process_exception_by_middleware(e, request)File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/core/handlers/base.py" in _get_response 113. response = wrapped_callback(request, *callback_args, **callback_kwargs)File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/views/generic/base.py" in view 71. return self.dispatch(request, *args, **kwargs)File "/var/lib/mailman/postorius/src/postorius/views/generic.py" in dispatch 61. int(kwargs.get('page', 1)))File "/var/lib/mailman/postorius/src/postorius/views/generic.py" in _get_list 55. return List.objects.get_or_404(fqdn_listname=list_id)File "/var/lib/mailman/postorius/src/postorius/models.py" in get_or_404 120. return self.get(*args, **kwargs)File "/var/lib/mailman/postorius/src/postorius/models.py" in get 105. return method(*args, **kwargs)File "/var/lib/mailman/mailmanclient/src/mailmanclient/client.py" in get_list 347. 'lists/{0}'.format(fqdn_listname))File "/var/lib/mailman/mailmanclient/src/mailmanclient/restbase/connection.py" in call 112. error_msg, response, None)During handling of the above exception (HTTP Error 500: <html> <head> <title>Internal Server Error</title> </head> <body> <h1><p>Internal Server Error</p></h1> </body></html>), another exception occurred:File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/core/handlers/exception.py" in inner 34. response = get_response(request)File "/var/lib/mailman/postorius/src/postorius/middleware.py" in __call__ 42. return self.get_response(request)File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/core/handlers/exception.py" in inner 36. response = response_for_exception(request, exc)File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/core/handlers/exception.py" in response_for_exception 90. response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/core/handlers/exception.py" in handle_uncaught_exception 125. return debug.technical_500_response(request, *exc_info)File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/views/debug.py" in technical_500_response 89. reporter = ExceptionReporter(request, exc_type, exc_value, tb)File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/views/debug.py" in __init__ 254. self.template_info = getattr(self.exc_value, 'template_debug', None)File "/usr/lib64/python3.6/tempfile.py" in __getattr__ 479. file = self.__dict__['file']Exception Type: KeyError at /postorius/lists/msgteam-hyd.lsmgr.nic.in/ <http://msgteam-hyd.lsmgr.nic.in/>Exception Value: 'file'*
Please help me by suggesting the resolution for this issue. Thanks in
advance.
On Mon, Feb 24, 2020 at 10:09 PM Mark Sapiro <mark@msapiro.net> wrote:
-- Thanks & Regards, Shashi Kanth.K 9052671936

On 2/24/20 7:44 PM, Shashikanth Komandoor wrote:
The below is the exception and the traceback I have copied and pasted:
...
The above exception, i.e., the 500 from the Mailman REST API is the issue. If your list has lots (thousands or maybe fewer on a slow server) of members, this could be a timeout. mailmanclient is just trying to get the list bye calling the REST API. This should be OK.
Whats in var/logs/mailman.log for this?
The KeyError comes from Django's attempt to log the error and is not the issue.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 2/5/20 5:01 PM, Shashikanth Komandoor wrote:
It is very difficult to even guess at what may be causing this without at least knowing the URL the link goes to and seeing a traceback and other info, but KeyError related to File is typically an error in Django's attempt to log the original error, and is not the actual error.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thank you dear Mark.
I have attached the images of the KeyError related to File for some URLs
But it is not mandatory that these URLs should give all the time the KeyError. Most of the times, I see the proper pages of those URLs. And not only that not only these URLs are giving the FileError other different URLs are also giving the same error.
It is not becoming possible to identify what might be the Root Cause for this error. I am running this Mailman 3 currently in production. And it has become very urgent for me to resolve this issue. Please extend your cooperation on this issue.
On Thu, Feb 6, 2020 at 11:25 PM Mark Sapiro <mark@msapiro.net> wrote:
-- Thanks & Regards, Shashi Kanth.K 9052671936

On 2/23/20 10:29 PM, Shashikanth Komandoor wrote:
Thank you dear Mark.
I have attached the images of the KeyError related to File for some URLs
Do not do this. Just copy and paste the error messages.
Further, your photos only show the beginning of the error. The only thing visible is the Python Path which is the least interesting information. What we need to see is the exception and the traceback and things related specifically to that.
And please no photo's or screen shots. Just copy/paste the relevant info.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Hi Mark,
Sorry for not providing the proper information and putting you
trouble. And no more screen shots from my side now onwards.
The below is the exception and the traceback I have copied and
pasted:
*Environment:Request Method: GETRequest URL: http://localhost:8000/postorius/lists/msgteam-hyd.lsmgr.nic.in/ <http://localhost:8000/postorius/lists/msgteam-hyd.lsmgr.nic.in/>Django Version: 2.2.9Python Version: 3.6.8Installed Applications:('hyperkitty', 'postorius', 'django_mailman3', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'django_gravatar', 'compressor', 'haystack', 'django_extensions', 'django_q', 'allauth', 'allauth.account', 'allauth.socialaccount')Installed Middleware:('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django_mailman3.middleware.TimezoneMiddleware', 'postorius.middleware.PostoriusMiddleware')Traceback:File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/core/handlers/exception.py" in inner 34. response = get_response(request)File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/core/handlers/base.py" in _get_response 115. response = self.process_exception_by_middleware(e, request)File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/core/handlers/base.py" in _get_response 113. response = wrapped_callback(request, *callback_args, **callback_kwargs)File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/views/generic/base.py" in view 71. return self.dispatch(request, *args, **kwargs)File "/var/lib/mailman/postorius/src/postorius/views/generic.py" in dispatch 61. int(kwargs.get('page', 1)))File "/var/lib/mailman/postorius/src/postorius/views/generic.py" in _get_list 55. return List.objects.get_or_404(fqdn_listname=list_id)File "/var/lib/mailman/postorius/src/postorius/models.py" in get_or_404 120. return self.get(*args, **kwargs)File "/var/lib/mailman/postorius/src/postorius/models.py" in get 105. return method(*args, **kwargs)File "/var/lib/mailman/mailmanclient/src/mailmanclient/client.py" in get_list 347. 'lists/{0}'.format(fqdn_listname))File "/var/lib/mailman/mailmanclient/src/mailmanclient/restbase/connection.py" in call 112. error_msg, response, None)During handling of the above exception (HTTP Error 500: <html> <head> <title>Internal Server Error</title> </head> <body> <h1><p>Internal Server Error</p></h1> </body></html>), another exception occurred:File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/core/handlers/exception.py" in inner 34. response = get_response(request)File "/var/lib/mailman/postorius/src/postorius/middleware.py" in __call__ 42. return self.get_response(request)File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/core/handlers/exception.py" in inner 36. response = response_for_exception(request, exc)File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/core/handlers/exception.py" in response_for_exception 90. response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/core/handlers/exception.py" in handle_uncaught_exception 125. return debug.technical_500_response(request, *exc_info)File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/views/debug.py" in technical_500_response 89. reporter = ExceptionReporter(request, exc_type, exc_value, tb)File "/var/lib/mailman/venv3/lib64/python3.6/site-packages/Django-2.2.9-py3.6.egg/django/views/debug.py" in __init__ 254. self.template_info = getattr(self.exc_value, 'template_debug', None)File "/usr/lib64/python3.6/tempfile.py" in __getattr__ 479. file = self.__dict__['file']Exception Type: KeyError at /postorius/lists/msgteam-hyd.lsmgr.nic.in/ <http://msgteam-hyd.lsmgr.nic.in/>Exception Value: 'file'*
Please help me by suggesting the resolution for this issue. Thanks in
advance.
On Mon, Feb 24, 2020 at 10:09 PM Mark Sapiro <mark@msapiro.net> wrote:
-- Thanks & Regards, Shashi Kanth.K 9052671936

On 2/24/20 7:44 PM, Shashikanth Komandoor wrote:
The below is the exception and the traceback I have copied and pasted:
...
The above exception, i.e., the 500 from the Mailman REST API is the issue. If your list has lots (thousands or maybe fewer on a slow server) of members, this could be a timeout. mailmanclient is just trying to get the list bye calling the REST API. This should be OK.
Whats in var/logs/mailman.log for this?
The KeyError comes from Django's attempt to log the error and is not the issue.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Shashikanth Komandoor