Skip to content

bug: anyio error on score submission #690

@SneznyKocur

Description

@SneznyKocur

Score submission is failing and i get this error in the log

bancho-1  | ERROR:    Exception in ASGI application
bancho-1  |   + Exception Group Traceback (most recent call last):
bancho-1  |   |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
bancho-1  |   |     yield
bancho-1  |   |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
bancho-1  |   |     async with anyio.create_task_group() as task_group:
bancho-1  |   |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__
bancho-1  |   |     raise BaseExceptionGroup(
bancho-1  |   | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
bancho-1  |   +-+---------------- 1 ----------------
bancho-1  |     | Traceback (most recent call last):
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
bancho-1  |     |     result = await app(  # type: ignore[func-returns-value]
bancho-1  |     |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
bancho-1  |     |     return await self.app(scope, receive, send)
bancho-1  |     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
bancho-1  |     |     await super().__call__(scope, receive, send)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
bancho-1  |     |     await self.middleware_stack(scope, receive, send)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
bancho-1  |     |     raise exc
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
bancho-1  |     |     await self.app(scope, receive, _send)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
bancho-1  |     |     with collapse_excgroups():
bancho-1  |     |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
bancho-1  |     |     self.gen.throw(typ, value, traceback)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
bancho-1  |     |     raise exc
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
bancho-1  |     |     response = await self.dispatch_func(request, call_next)
bancho-1  |     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |     |   File "/srv/root/app/api/init_api.py", line 157, in http_middleware
bancho-1  |     |     return await call_next(request)
bancho-1  |     |            ^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
bancho-1  |     |     raise app_exc
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
bancho-1  |     |     await self.app(scope, receive_or_disconnect, send_no_error)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
bancho-1  |     |     with collapse_excgroups():
bancho-1  |     |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
bancho-1  |     |     self.gen.throw(typ, value, traceback)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
bancho-1  |     |     raise exc
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
bancho-1  |     |     response = await self.dispatch_func(request, call_next)
bancho-1  |     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |     |   File "/srv/root/app/api/middlewares.py", line 22, in dispatch
bancho-1  |     |     response = await call_next(request)
bancho-1  |     |                ^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
bancho-1  |     |     raise app_exc
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
bancho-1  |     |     await self.app(scope, receive_or_disconnect, send_no_error)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
bancho-1  |     |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
bancho-1  |     |     raise exc
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
bancho-1  |     |     await app(scope, receive, sender)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
bancho-1  |     |     await self.middleware_stack(scope, receive, send)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
bancho-1  |     |     await route.handle(scope, receive, send)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 557, in handle
bancho-1  |     |     await self.app(scope, receive, send)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
bancho-1  |     |     await self.middleware_stack(scope, receive, send)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
bancho-1  |     |     await route.handle(scope, receive, send)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
bancho-1  |     |     await self.app(scope, receive, send)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
bancho-1  |     |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
bancho-1  |     |     raise exc
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
bancho-1  |     |     await app(scope, receive, sender)
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
bancho-1  |     |     response = await func(request)
bancho-1  |     |                ^^^^^^^^^^^^^^^^^^^
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
bancho-1  |     |     raise e
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
bancho-1  |     |     raw_response = await run_endpoint_function(
bancho-1  |     |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |     |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
bancho-1  |     |     return await dependant.call(**values)
bancho-1  |     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |     |   File "/srv/root/app/api/domains/osu.py", line 647, in osuSubmitModularSelector
bancho-1  |     |     stacktrace = app.utils.get_appropriate_stacktrace()
bancho-1  |     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |     |   File "/srv/root/app/utils.py", line 155, in get_appropriate_stacktrace
bancho-1  |     |     return [
bancho-1  |     |            ^
bancho-1  |     |   File "/srv/root/app/utils.py", line 161, in <listcomp>
bancho-1  |     |     "locals": {k: repr(v) for k, v in frame.frame.f_locals.items()},
bancho-1  |     |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |     |   File "/srv/root/app/utils.py", line 161, in <dictcomp>
bancho-1  |     |     "locals": {k: repr(v) for k, v in frame.frame.f_locals.items()},
bancho-1  |     |                   ^^^^^^^
bancho-1  |     |   File "/usr/local/lib/python3.11/dataclasses.py", line 240, in wrapper
bancho-1  |     |     result = user_function(self)
bancho-1  |     |              ^^^^^^^^^^^^^^^^^^^
bancho-1  |     |   File "<string>", line 3, in __repr__
bancho-1  |     |   File "/usr/local/lib/python3.11/dataclasses.py", line 240, in wrapper
bancho-1  |     |     result = user_function(self)
bancho-1  |     |              ^^^^^^^^^^^^^^^^^^^
bancho-1  |     |   File "<string>", line 3, in __repr__
bancho-1  |     |   File "/usr/local/lib/python3.11/dataclasses.py", line 240, in wrapper
bancho-1  |     |     result = user_function(self)
bancho-1  |     |              ^^^^^^^^^^^^^^^^^^^
bancho-1  |     |   File "<string>", line 3, in __repr__
bancho-1  |     | AttributeError: 'MemoryObjectItemReceiver' object has no attribute 'item'
bancho-1  |     +------------------------------------
bancho-1  | 
bancho-1  | During handling of the above exception, another exception occurred:
bancho-1  | 
bancho-1  | Traceback (most recent call last):
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
bancho-1  |     result = await app(  # type: ignore[func-returns-value]
bancho-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
bancho-1  |     return await self.app(scope, receive, send)
bancho-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
bancho-1  |     await super().__call__(scope, receive, send)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
bancho-1  |     await self.middleware_stack(scope, receive, send)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
bancho-1  |     raise exc
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
bancho-1  |     await self.app(scope, receive, _send)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
bancho-1  |     with collapse_excgroups():
bancho-1  |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
bancho-1  |     self.gen.throw(typ, value, traceback)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
bancho-1  |     raise exc
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
bancho-1  |     response = await self.dispatch_func(request, call_next)
bancho-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |   File "/srv/root/app/api/init_api.py", line 157, in http_middleware
bancho-1  |     return await call_next(request)
bancho-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
bancho-1  |     raise app_exc
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
bancho-1  |     await self.app(scope, receive_or_disconnect, send_no_error)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
bancho-1  |     with collapse_excgroups():
bancho-1  |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
bancho-1  |     self.gen.throw(typ, value, traceback)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
bancho-1  |     raise exc
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
bancho-1  |     response = await self.dispatch_func(request, call_next)
bancho-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |   File "/srv/root/app/api/middlewares.py", line 22, in dispatch
bancho-1  |     response = await call_next(request)
bancho-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
bancho-1  |     raise app_exc
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
bancho-1  |     await self.app(scope, receive_or_disconnect, send_no_error)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
bancho-1  |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
bancho-1  |     raise exc
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
bancho-1  |     await app(scope, receive, sender)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
bancho-1  |     await self.middleware_stack(scope, receive, send)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
bancho-1  |     await route.handle(scope, receive, send)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 557, in handle
bancho-1  |     await self.app(scope, receive, send)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
bancho-1  |     await self.middleware_stack(scope, receive, send)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
bancho-1  |     await route.handle(scope, receive, send)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
bancho-1  |     await self.app(scope, receive, send)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
bancho-1  |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
bancho-1  |     raise exc
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
bancho-1  |     await app(scope, receive, sender)
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
bancho-1  |     response = await func(request)
bancho-1  |                ^^^^^^^^^^^^^^^^^^^
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
bancho-1  |     raise e
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
bancho-1  |     raw_response = await run_endpoint_function(
bancho-1  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
bancho-1  |     return await dependant.call(**values)
bancho-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |   File "/srv/root/app/api/domains/osu.py", line 647, in osuSubmitModularSelector
bancho-1  |     stacktrace = app.utils.get_appropriate_stacktrace()
bancho-1  |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |   File "/srv/root/app/utils.py", line 155, in get_appropriate_stacktrace
bancho-1  |     return [
bancho-1  |            ^
bancho-1  |   File "/srv/root/app/utils.py", line 161, in <listcomp>
bancho-1  |     "locals": {k: repr(v) for k, v in frame.frame.f_locals.items()},
bancho-1  |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bancho-1  |   File "/srv/root/app/utils.py", line 161, in <dictcomp>
bancho-1  |     "locals": {k: repr(v) for k, v in frame.frame.f_locals.items()},
bancho-1  |                   ^^^^^^^
bancho-1  |   File "/usr/local/lib/python3.11/dataclasses.py", line 240, in wrapper
bancho-1  |     result = user_function(self)
bancho-1  |              ^^^^^^^^^^^^^^^^^^^
bancho-1  |   File "<string>", line 3, in __repr__
bancho-1  |   File "/usr/local/lib/python3.11/dataclasses.py", line 240, in wrapper
bancho-1  |     result = user_function(self)
bancho-1  |              ^^^^^^^^^^^^^^^^^^^
bancho-1  |   File "<string>", line 3, in __repr__
bancho-1  |   File "/usr/local/lib/python3.11/dataclasses.py", line 240, in wrapper
bancho-1  |     result = user_function(self)
bancho-1  |              ^^^^^^^^^^^^^^^^^^^
bancho-1  |   File "<string>", line 3, in __repr__
bancho-1  | AttributeError: 'MemoryObjectItemReceiver' object has no attribute 'item'

Bancho.py version: 5.2.2
Python version: 3.11.X (default in the container)
Not sure if this is a bancho.py bug or just a misconfiguration of some sort on my end.
I also get nothing in the .data directory

Metadata

Metadata

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions