Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FirmwareImageDetailView raised exception during schema generation #127

Open
minhng99 opened this issue Mar 17, 2021 · 4 comments
Open

FirmwareImageDetailView raised exception during schema generation #127

minhng99 opened this issue Mar 17, 2021 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers Hacktoberfest Easy issues for attracting Hacktoberfest participants.

Comments

@minhng99
Copy link

minhng99 commented Mar 17, 2021

Hi, I'm getting these warning in the log after running for a while:

[WARNING 2021-03-11 11:55:14,460] module: base, process: 1329847, thread: 140595094034240
view's FirmwareImageDetailView raised exception during schema generation; use `getattr(self, 'swagger_fake_view', False)` to detect and short-circuit this
Traceback (most recent call last):
  File "/opt/openwisp2/env/lib/python3.8/site-packages/drf_yasg/inspectors/base.py", line 42, in call_view_method
    return view_method()
  File "/opt/openwisp2/env/lib/python3.8/site-packages/openwisp_firmware_upgrader/api/views.py", line 159, in get_queryset
    return super().get_queryset().filter(build=self.kwargs['build_pk'])
KeyError: 'build_pk'

[WARNING 2021-03-11 11:57:07,047] module: base, process: 1329845, thread: 140595094034240
view's NotificationReadAllView raised exception during schema generation; use `getattr(self, 'swagger_fake_view', False)` to detect and short-circuit this
Traceback (most recent call last):
  File "/opt/openwisp2/env/lib/python3.8/site-packages/drf_yasg/inspectors/base.py", line 42, in call_view_method
    return view_method()
  File "/opt/openwisp2/env/lib/python3.8/site-packages/rest_framework/generics.py", line 108, in get_serializer
    serializer_class = self.get_serializer_class()
  File "/opt/openwisp2/env/lib/python3.8/site-packages/rest_framework/generics.py", line 122, in get_serializer_class
    assert self.serializer_class is not None, (
AssertionError: 'NotificationReadAllView' should either include a `serializer_class` attribute, or override the `get_serializer_class()` method.

[WARNING 2021-03-11 11:57:07,070] module: base, process: 1329845, thread: 140595094034240
view's NotificationReadRedirect raised exception during schema generation; use `getattr(self, 'swagger_fake_view', False)` to detect and short-circuit this
Traceback (most recent call last):
  File "/opt/openwisp2/env/lib/python3.8/site-packages/drf_yasg/inspectors/base.py", line 42, in call_view_method
    return view_method()
  File "/opt/openwisp2/env/lib/python3.8/site-packages/rest_framework/generics.py", line 108, in get_serializer
    serializer_class = self.get_serializer_class()
  File "/opt/openwisp2/env/lib/python3.8/site-packages/rest_framework/generics.py", line 122, in get_serializer_class
    assert self.serializer_class is not None, (
AssertionError: 'NotificationReadRedirect' should either include a `serializer_class` attribute, or override the `get_serializer_class()` method.

OS: Ubuntu 20.04.2

@nemesifier nemesifier added the bug Something isn't working label Mar 17, 2021
@nemesifier nemesifier added the Hacktoberfest Easy issues for attracting Hacktoberfest participants. label Oct 1, 2021
@pandafy pandafy added this to the Release 0.2.0 milestone Jan 26, 2022
@pandafy pandafy added the good first issue Good for newcomers label Jan 26, 2022
@eleensmathew
Copy link

Hi can i work on this? I don't have experience working on a project like this so please guide me.

@nemesifier nemesifier removed this from the Release 1.0.0 milestone May 5, 2022
@SonakshiChauhan
Copy link

Hi I would like to work on this durinh hacktober fest. Please assign it to me @minhng99

@Vihar214
Copy link

Vihar214 commented Dec 4, 2022

Hello, Is there anyone working on this issue if not then can you assign this issue to Me?

@tspare
Copy link
Contributor

tspare commented Mar 30, 2023

I tried to reproduce this but I think the issue is nolonger there. I see:
HTTP GET /api/v1/firmware-upgrader/build/216caba4-cbf0-485e-8d34-be87a1c32675/image/feb0ca62-536d-4fa4-9acf-f78353a6376c/ 200 [0.04, 127.0.0.1:48468]
And no traceback in the console where django is running. Should I be looking somewhere else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers Hacktoberfest Easy issues for attracting Hacktoberfest participants.
Projects
Status: To do (Python & Django)
Development

No branches or pull requests

7 participants