You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to add annotations, the app returns raises a ValidationError while getting the current active user. The code in commit 8f6adf9 works fine for me. The following commit might have broken authentication. I think the same applies to other actions too.
What I Did
I've setup Whombat, created a user, a dataset and an annotation task. When I try to add any kind of annotation (e.g. a bounding box), I receive an internal server error. Running dev mode or adding a super user does not change this behavior.
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/starlette/applications.py", line 116, in __call__
await self.middleware_stack(scope, receive, send)
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
raise exc
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 91, in __call__
await self.simple_response(scope, receive, send, request_headers=headers)
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 146, in simple_response
await self.app(scope, receive, send)
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 55, in wrapped_app
raise exc
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 44, in wrapped_app
await app(scope, receive, sender)
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/starlette/routing.py", line 746, in __call__
await route.handle(scope, receive, send)
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
await self.app(scope, receive, send)
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/starlette/routing.py", line 75, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 55, in wrapped_app
raise exc
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 44, in wrapped_app
await app(scope, receive, sender)
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/starlette/routing.py", line 70, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 285, in app
raise e
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 275, in app
solved_result = await solve_dependencies(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/fastapi/dependencies/utils.py", line 598, in solve_dependencies
solved = await call(**sub_values)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vogelbam/projects/whombat/back/src/whombat/routes/dependencies/auth.py", line 48, in get_current_user
return schemas.SimpleUser.model_validate(current_active_user)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vogelbam/projects/whombat/back/.venv/lib/python3.11/site-packages/pydantic/main.py", line 503, in model_validate
return cls.__pydantic_validator__.validate_python(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for SimpleUser
Input should be a valid dictionary or object to extract fields from [type=model_attributes_type, input_value=<function Authenticator.c...dency at 0x7f22f008e700>, input_type=function]
For further information visit https://errors.pydantic.dev/2.5/v/model_attributes_type
The text was updated successfully, but these errors were encountered:
Description
Trying to add annotations, the app returns raises a ValidationError while getting the current active user. The code in commit 8f6adf9 works fine for me. The following commit might have broken authentication. I think the same applies to other actions too.
What I Did
I've setup Whombat, created a user, a dataset and an annotation task. When I try to add any kind of annotation (e.g. a bounding box), I receive an internal server error. Running dev mode or adding a super user does not change this behavior.
The text was updated successfully, but these errors were encountered: