fastapi.exceptions.FastAPIError: Invalid args for response field! "is a valid Pydantic field type"??? Anyone know what is this? #972
Replies: 3 comments 2 replies
-
Have not seen this before. Could be an incompatibility with the fastapi version you have installed. The webui recently pinned fastapi version to 0.90.1 (because there were issues with 0.91), but this extension pins it to 0.87.0. What revision of the webui are you running? Maybe also post the info that is listed in the bug report template |
Beta Was this translation helpful? Give feedback.
-
that is a good question, I can't seem to find how to check what version it is. yesterday I've used the git pull command and it said up to date so probably is the last version. |
Beta Was this translation helpful? Give feedback.
-
ok, I've checked in the webui for updates today and it said is behind, updated and restarted everything, the error doesn't show up anymore. it did show up after update and reload UI but got away when restarting the whole thing. I don't know. I will post here if I see it back. Thanks for the help. :) |
Beta Was this translation helpful? Give feedback.
-
installed the extension and got this message
Error executing callback app_started_callback for U:\stable-diffusion-webui\extensions\sd_dreambooth_extension\scripts\api.py
Traceback (most recent call last):
File "U:\stable-diffusion-webui\modules\script_callbacks.py", line 101, in app_started_callback
c.callback(demo, app)
File "U:\stable-diffusion-webui\extensions\sd_dreambooth_extension\scripts\api.py", line 141, in dreambooth_api
async def cancel_jobs(
File "U:\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 657, in decorator
self.add_api_route(
File "U:\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 596, in add_api_route
route = route_class(
File "U:\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 405, in init
self.response_field = create_response_field(
File "U:\stable-diffusion-webui\venv\lib\site-packages\fastapi\utils.py", line 90, in create_response_field
raise fastapi.exceptions.FastAPIError(
fastapi.exceptions.FastAPIError: Invalid args for response field! Hint: check that typing.Union[extensions.sd_dreambooth_extension.dreambooth.db_shared.DreamState, starlette.responses.JSONResponse] is a valid Pydantic field type. If you are using a return type annotation that is not a valid Pydantic field (e.g. Union[Response, dict, None]) you can disable generating the response model from the type annotation with the path operation decorator parameter response_model=None. Read more: https://fastapi.tiangolo.com/tutorial/response-model/
What is this? Help Thank You
Beta Was this translation helpful? Give feedback.
All reactions