2.2.5 release api-1.1 500 errors
Daniel Axtens
dja at axtens.net
Sat Aug 21 00:14:43 AEST 2021
Konstantin Ryabitsev <konstantin at linuxfoundation.org> writes:
> Hello:
>
> After the 2.2.2->2.2.5 upgrade, we seem to be getting lots of /api/1.1/ errors
> for PATCH calls:
>
> PATCH /api/1.1/patches/{id}/
>
> switching to /api/1.2/ seems to fix it, but requires other client app fixes
> for API incompatibility.
>
> Some of the others returning 500 errors are:
>
> GET /api/patches/{msgid}/comments/
>
> I'd be happy to provide tracebacks if I can figure out how to get them.
Here's the PATCH traceback:
Environment:
Request Method: PATCH
Request URL: http://localhost:8000/api/1.1/patches/1/
Django Version: 2.2.24
Python Version: 3.8.10
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.humanize',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.staticfiles',
'patchwork',
'rest_framework',
'rest_framework.authtoken',
'django_filters',
'debug_toolbar',
'dbbackup']
Installed Middleware:
['debug_toolbar.middleware.DebugToolbarMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.contrib.admindocs.middleware.XViewMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
115. response = self.process_exception_by_middleware(e, request)
File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
113. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/views/decorators/csrf.py" in wrapped_view
54. return view_func(*args, **kwargs)
File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/views/generic/base.py" in view
71. return self.dispatch(request, *args, **kwargs)
File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/rest_framework/views.py" in dispatch
505. response = self.handle_exception(exc)
File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/rest_framework/views.py" in handle_exception
465. self.raise_uncaught_exception(exc)
File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/rest_framework/views.py" in raise_uncaught_exception
476. raise exc
File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/rest_framework/views.py" in dispatch
502. response = handler(request, *args, **kwargs)
File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/rest_framework/generics.py" in patch
258. return self.partial_update(request, *args, **kwargs)
File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/rest_framework/mixins.py" in partial_update
82. return self.update(request, *args, **kwargs)
File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/rest_framework/mixins.py" in update
75. return Response(serializer.data)
File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/rest_framework/serializers.py" in data
562. ret = super().data
File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/rest_framework/serializers.py" in data
260. self._data = self.to_representation(self.instance)
File "/home/patchwork/patchwork/patchwork/api/patch.py" in to_representation
129. data = super(PatchListSerializer, self).to_representation(instance)
File "/home/patchwork/patchwork/patchwork/api/base.py" in to_representation
99. data.pop(field)
Exception Type: KeyError at /api/1.1/patches/1/
Exception Value: 'related'
Kind regards,
Daniel
>
> -K
> _______________________________________________
> Patchwork mailing list
> Patchwork at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/patchwork
More information about the Patchwork
mailing list