2.2.5 release api-1.1 500 errors

Daniel Axtens dja at axtens.net
Sat Aug 21 01:11:24 AEST 2021


> 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.

yeah msgid is not a valid argument there, it needs to be a number. If
you got a traceback it would look like this:


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 get
  199.         return self.list(request, *args, **kwargs)

File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/rest_framework/mixins.py" in list
  38.         queryset = self.filter_queryset(self.get_queryset())

File "/home/patchwork/patchwork/patchwork/api/comment.py" in get_queryset
  70.         if not Submission.objects.filter(pk=self.kwargs['pk']).exists():

File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/db/models/manager.py" in manager_method
  82.                 return getattr(self.get_queryset(), name)(*args, **kwargs)

File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/db/models/query.py" in filter
  892.         return self._filter_or_exclude(False, *args, **kwargs)

File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/db/models/query.py" in _filter_or_exclude
  910.             clone.query.add_q(Q(*args, **kwargs))

File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/db/models/sql/query.py" in add_q
  1290.         clause, _ = self._add_q(q_object, self.used_aliases)

File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/db/models/sql/query.py" in _add_q
  1315.                 child_clause, needed_inner = self.build_filter(

File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/db/models/sql/query.py" in build_filter
  1251.         condition = self.build_lookup(lookups, col, value)

File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/db/models/sql/query.py" in build_lookup
  1116.         lookup = lookup_class(lhs, rhs)

File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/db/models/lookups.py" in __init__
  20.         self.rhs = self.get_prep_lookup()

File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/db/models/lookups.py" in get_prep_lookup
  70.             return self.lhs.output_field.get_prep_value(self.rhs)

File "/opt/pyenv/versions/3.8.10/lib/python3.8/site-packages/django/db/models/fields/__init__.py" in get_prep_value
  972.         return int(value)

Exception Type: ValueError at /api/patches/abc at def/comments/
Exception Value: invalid literal for int() with base 10: 'abc at def'

sigh; patch incoming.



>
> -K
> _______________________________________________
> Patchwork mailing list
> Patchwork at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/patchwork


More information about the Patchwork mailing list