As discussed in #12027 with @zlopez I'm opening a new ticket to investigate mailing lists API functionality which seems broken ATM. I tried a few examples from https://lists.fedoraproject.org/archives/api/ and all returns server error. For example: https://lists.fedoraproject.org/archives/api/lists/
https://lists.fedoraproject.org/archives/api/
https://lists.fedoraproject.org/archives/api/lists/
Not urgent. I'd like to have it working to complete the inactive packagers periodic check, but I could also do that without checking mailing lists activity if the issue requires some time to be sorted out.
Metadata Update from @phsmoura: - Issue assigned to zlopez - Issue priority set to: Waiting on Assignee (was: Needs Review) - Issue tagged with: medium-gain, medium-trouble, ops
I found the error on the server, but I need to look at it more closely to be able to figure out what is happening:
ERROR 2024-08-20 02:49:06,906 3992371 django.request Internal Server Error: /archives/api/lists/ Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) File "/usr/lib/python3.9/site-packages/django/core/handlers/base.py", line 220, in _get_response response = response.render() File "/usr/lib/python3.9/site-packages/django/template/response.py", line 114, in render self.content = self.rendered_content File "/usr/lib/python3.9/site-packages/rest_framework/response.py", line 70, in rendered_content ret = renderer.render(self.data, accepted_media_type, context) File "/usr/lib/python3.9/site-packages/rest_framework/renderers.py", line 722, in render template = loader.get_template(self.template) File "/usr/lib/python3.9/site-packages/django/template/loader.py", line 19, in get_template raise TemplateDoesNotExist(template_name, chain=chain) django.template.exceptions.TemplateDoesNotExist: rest_framework/api.html
I found out that we were missing
'DEFAULT_RENDERER_CLASSES': [ 'rest_framework.renderers.JSONRenderer', ],
in django configuration.
The https://lists.fedoraproject.org/archives/api/lists/ is now working after adding that. And here is the PR to fix it permanently.
Metadata Update from @zlopez: - Issue close_status updated to: Fixed with Explanation - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.