idac - UpdateChallengeModeResult have a was never awaited error #111

Closed
opened 2024-03-12 12:19:06 +00:00 by zaphkito · 2 comments
Contributor
app-1         | INFO:     183.197.99.200:17841 - "POST /150/initiald/User/UpdateChallengeModeResult HTTP/1.1" 500 Internal Server Error
app-1         | ERROR:    Exception in ASGI application
app-1         | Traceback (most recent call last):
app-1         |   File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
app-1         |     result = await app(  # type: ignore[func-returns-value]
app-1         |   File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 69, in __call__
app-1         |     return await self.app(scope, receive, send)
app-1         |   File "/usr/local/lib/python3.9/site-packages/starlette/applications.py", line 123, in __call__
app-1         |     await self.middleware_stack(scope, receive, send)
app-1         |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 186, in __call__
app-1         |     raise exc
app-1         |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 164, in __call__
app-1         |     await self.app(scope, receive, _send)
app-1         |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
app-1         |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
app-1         |   File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
app-1         |     raise exc
app-1         |   File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
app-1         |     await app(scope, receive, sender)
app-1         |   File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 756, in __call__
app-1         |     await self.middleware_stack(scope, receive, send)
app-1         |   File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 776, in app
app-1         |     await route.handle(scope, receive, send)
app-1         |   File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 297, in handle
app-1         |     await self.app(scope, receive, send)
app-1         |   File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 77, in app
app-1         |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
app-1         |   File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
app-1         |     raise exc
app-1         |   File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
app-1         |     await app(scope, receive, sender)
app-1         |   File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 72, in app
app-1         |     response = await func(request)
app-1         |   File "/app/titles/idac/index.py", line 136, in render_POST
app-1         |     return JSONResponseNoASCII(resp)
app-1         |   File "/usr/local/lib/python3.9/site-packages/starlette/responses.py", line 41, in __init__
app-1         |     self.body = self.render(content)
app-1         |   File "/app/core/title.py", line 17, in render
app-1         |     return json.dumps(
app-1         |   File "/usr/local/lib/python3.9/json/__init__.py", line 234, in dumps
app-1         |     return cls(
app-1         |   File "/usr/local/lib/python3.9/json/encoder.py", line 199, in encode
app-1         |     chunks = self.iterencode(o, _one_shot=True)
app-1         |   File "/usr/local/lib/python3.9/json/encoder.py", line 257, in iterencode
app-1         |     return _iterencode(o, 0)
app-1         |   File "/usr/local/lib/python3.9/json/encoder.py", line 179, in default
app-1         |     raise TypeError(f'Object of type {o.__class__.__name__} '
app-1         | TypeError: Object of type coroutine is not JSON serializable
app-1         | /usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py:419: RuntimeWarning: coroutine 'IDACSeason2._generate_challenge_data' was never awaited
app-1         |   self.transport.close()
app-1         | RuntimeWarning: Enable tracemalloc to get the object allocation traceback
``` app-1 | INFO: 183.197.99.200:17841 - "POST /150/initiald/User/UpdateChallengeModeResult HTTP/1.1" 500 Internal Server Error app-1 | ERROR: Exception in ASGI application app-1 | Traceback (most recent call last): app-1 | File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi app-1 | result = await app( # type: ignore[func-returns-value] app-1 | File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 69, in __call__ app-1 | return await self.app(scope, receive, send) app-1 | File "/usr/local/lib/python3.9/site-packages/starlette/applications.py", line 123, in __call__ app-1 | await self.middleware_stack(scope, receive, send) app-1 | File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 186, in __call__ app-1 | raise exc app-1 | File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 164, in __call__ app-1 | await self.app(scope, receive, _send) app-1 | File "/usr/local/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 65, in __call__ app-1 | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) app-1 | File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app app-1 | raise exc app-1 | File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app app-1 | await app(scope, receive, sender) app-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 756, in __call__ app-1 | await self.middleware_stack(scope, receive, send) app-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 776, in app app-1 | await route.handle(scope, receive, send) app-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 297, in handle app-1 | await self.app(scope, receive, send) app-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 77, in app app-1 | await wrap_app_handling_exceptions(app, request)(scope, receive, send) app-1 | File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app app-1 | raise exc app-1 | File "/usr/local/lib/python3.9/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app app-1 | await app(scope, receive, sender) app-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 72, in app app-1 | response = await func(request) app-1 | File "/app/titles/idac/index.py", line 136, in render_POST app-1 | return JSONResponseNoASCII(resp) app-1 | File "/usr/local/lib/python3.9/site-packages/starlette/responses.py", line 41, in __init__ app-1 | self.body = self.render(content) app-1 | File "/app/core/title.py", line 17, in render app-1 | return json.dumps( app-1 | File "/usr/local/lib/python3.9/json/__init__.py", line 234, in dumps app-1 | return cls( app-1 | File "/usr/local/lib/python3.9/json/encoder.py", line 199, in encode app-1 | chunks = self.iterencode(o, _one_shot=True) app-1 | File "/usr/local/lib/python3.9/json/encoder.py", line 257, in iterencode app-1 | return _iterencode(o, 0) app-1 | File "/usr/local/lib/python3.9/json/encoder.py", line 179, in default app-1 | raise TypeError(f'Object of type {o.__class__.__name__} ' app-1 | TypeError: Object of type coroutine is not JSON serializable app-1 | /usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py:419: RuntimeWarning: coroutine 'IDACSeason2._generate_challenge_data' was never awaited app-1 | self.transport.close() app-1 | RuntimeWarning: Enable tracemalloc to get the object allocation traceback ```
Collaborator

Please test out the last commit that Hay1tsme pushed, it should fix this issue

Thank you

Please test out the last commit that Hay1tsme pushed, it should fix this issue Thank you
Midorica added the
bug
waiting
labels 2024-03-12 14:22:23 +00:00
Hay1tsme added the
idac
label 2024-03-12 14:23:37 +00:00
Author
Contributor

it work,thanks for fix

it work,thanks for fix
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Hay1tsme/artemis#111
No description provided.